Skip to content

Pawel-Parma/remap-keys

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

RemapKeys

RemapKeys allows you to remap your keyboard keys.
The default mapping "mirrors" the 1-0, q-p, a-l and z-m keys to reach the entire keyboard with one hand.

It consists of two main parts: a script written in AutoHotkey (remap.ahk) and a Python script (main.py).

Using remap.ahk

AutoHotkey (v1.1) script that remaps your keyboard keys according to a predefined mapping.

To use it:

  1. Make sure you have AutoHotkey v1.1 installed. If not, you can download it from here.

  2. Double-click on the remap.ahk file to run the script.

  3. Use the key combination Ctrl + Alt + Shift to toggle the key remapping on and off

Tips:

  • You can add the script to your startup folder.

  • Change the key combination.

Using main.py

A Python script that allows you to generate your own key mappings.

To use it:

  1. Make sure you have Python installed. If not, you can download it from here.

  2. Open the main.py file in a text editor.

  3. Modify the mapping dictionary to define your own key mappings. For example "1": "0" - remap 1 to 0.

  4. Ensure sort_values has all the keys from the mapping dictionary in the order you want them to be sorted.

  5. Run the script with the command python main.py. It will print the AutoHotkey code for the new mappings.

  6. Copy the output and paste it into the remap.ahk file below the mapping := Object() in the ; Mapping section.

**Note:** +
You have to use the AutoHotkey's notation of keys.

Current mapping dictionary:

mapping = {
    "``": "{Backspace}",
    "F1": "{Enter}",

    "1": "0",  "q": "p",  "a": "l",  "z": "m",
    "2": "9",  "w": "o",  "s": "k",  "x": "n",
    "3": "8",  "e": "i",  "d": "j",  "c": "b",
    "4": "7",  "r": "u",  "f": "h",  "v": "v",
    "5": "6",  "t": "y",  "g": "g",  "b": "c",
    "6": "5",  "y": "t",  "h": "f",  "n": "x",
    "7": "4",  "u": "r",  "j": "d",  "m": "z",
    "8": "3",  "i": "e",  "k": "s",
    "9": "2",  "o": "w",  "l": "a",
    "0": "1",  "p": "q",
}