Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uncap but unnum - a request for a favour #27

Open
kamylka13 opened this issue Feb 19, 2024 · 1 comment
Open

Uncap but unnum - a request for a favour #27

kamylka13 opened this issue Feb 19, 2024 · 1 comment

Comments

@kamylka13
Copy link

I love the idea and execution of this little tool! It works great on my work laptop, however what would really be amazing is have the same thing but mapping Numlock to literally anything else. Shift or Ctrl for instance. I can't seem to remap anything using uncap unfortunately, I can't save the file in C:/Program Files as I don't have admin permissions. It also runs with the command prompt open and no inputs are recognised when I try to do anything at all.

I'm not great with programming so I would be forever grateful if someone could re-write uncap to do re-map Numlock to Ctrl or Shift by default, as my work machine prevents me from doing just about anything, but uncap seems to work fine from the downloads folder. Thank you in advance for any help!

@ClausAndersen
Copy link

As I read this: uncap is already capable of everything you are asking...

When uncap is running CAPS is mapped to ESC as default. You say that it runs for you so this should work. When it is running this works in all other windows until it is terminated.

You do not need to save it in Program Files. It can run from anywhere. Start by opening a command prompt (cmd.exe) and then read the excellent documentation. Corporate IT might have set policies to stop execution of unsigned executables but if you can run things from the downloads folder you are good to go.

As stated in the documentation you can find a list of keycodes in MSDN.

You can furthermore verify this by running uncap with the debug flag to see the keycodes:

C:\>uncap -d
KEYUP        0     0 128 -   -   -   -   UP   28  13 (RETURN)
KEYDOWN      0     0   1 EXT -   -   -   -    69 144 (0x90)
KEYUP        0     0 129 EXT -   -   -   UP   69 144 (0x90)
KEYDOWN      0     0   0 -   -   -   -   -    42 160 (0xA0)
KEYUP        0     0 128 -   -   -   -   UP   42 160 (0xA0)
KEYDOWN      0     0   0 -   -   -   -   -    29 162 (0xA2)
KEYUP        0     0 128 -   -   -   -   UP   29 162 (0xA2)

The "RETURN" was me pressing return to execute the command. Then I pressed "Numlock", "Left Shift" and "Left Ctrl". You can then see the keycodes 0x90, 0xA0 and 0xA2 which matches the MSDN documentation.

So if you want to remap Numlock, Shift and Ctrl to ESC you could run:

uncap 0x90:0x1B 0xA0:0x1B 0xA2:0x1B

Or to simply remap Numlock to Left Shift

uncap 0x90:0xA0

Or remapping Numlock to Left Ctrl

uncap 0x90:0xA2

When things are working as you want you can create an extremely simple batch (.bat) file. This is just a text document with that command. Then put this in the startup folder and it will start whenever you log into your computer.

Or just set it in the registry as described in the documentation.

Everything is already there. You do not need to be a programmer or have a new tool. The tools available are fully capable of your request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants