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

'Type Key' recognizes incorrect Num Lock key #530

Closed
nummacway opened this issue May 3, 2023 · 6 comments
Closed

'Type Key' recognizes incorrect Num Lock key #530

nummacway opened this issue May 3, 2023 · 6 comments

Comments

@nummacway
Copy link

On the several computers I own, Sharp Keys always fails to recognize the Num Lock key when I use the 'Type a Key' feature:
image
This is not just an incorrect name, it's an incorrect key: Remapping it will not do anything, but other keys learnt by that feature (I tested Caps Lock and Scroll Lock) do work, so does picking Num Lock from the list.

All computers tested have a German (Germany) locale and they were running Windows 10 22H2 (two computers), Windows 10 22H1 and Windows 7. I tried PS/2 and USB keyboards. However, I did only actually test remapping E0_45 on one Windows 10 22H2 computer with an USB keyboard.

@DreymaR
Copy link

DreymaR commented May 4, 2023

The Special: NumLock key should have ordinary scan code (00_45). I can confirm that 'Type a key' incorrectly(?) registers my NumLock to as Special: € (E0_45).

Looks like some kind of bug?

@randyrants
Copy link
Owner

Some questions:

  • What keyboard layout is being used? I see a call out that de-DE is being used for locale, but in what sense? Display, input, keyboard layout? Each setting is different and may impact the app.
  • Does the key remap correctly? I mean, I get it says euro, but if you remap it to something else, does it work anyway?
  • What happens if you select Num_Lock from the list of characters when setting up a remapping?

Thanks!

@nummacway
Copy link
Author

nummacway commented May 7, 2023

By locale, I mean the Windows region and display language. The software-side keyboard layout is German as well. There are only two physical keyboard layouts in the world, ANSI and ISO, of which I used the latter on all my computers I tested. Except for very cheap imports and some cheap laptops, European keyboards are always ISO.
I gave all other details in my OP.

@randyrants
Copy link
Owner

Thanks for the additional info; I also, re-read the OP, as I missed the answers to the bottom two questions.

My guess here is that the keyboard layout is translating the scancode somewhere in the Windows stack before it gets passed to SharpKeys. I've seen this happen, where I've connected a ja-JP or en-GB keyboard to a PC running en-US language/keyboard and it gets interesting, because it can vary. There are times when they key will respond based off its location, other times when it gives you what's on the label of the key, and other times when it just ignores you (because there's no en-US key equivalent, like the Kana key.) It's really, really messy when trying to code, because [ {, ] }, and /? are all over the place.

Not much I can do with this one, as I do not have the resources to try to shift the labels of the scancodes to map to the local keyboard changes, so I can't try that. It took at least 6 years before I got my hands on a keyboard with Alt+Gr to test some early attempts at mapping , but if people wanted to fork the codebase, they could start localizing it on their own.

Only other thing I could think to do is select the 00_45 by hand and export the Scancode Layout from the Registry for future use. If you always remap that key on every machine you touch, it's a lot easier than installing the app and setting the UI each time. I don't think I've run SharpKeys to remap my keys in a couple of years :)

HTH!

@nummacway
Copy link
Author

If you still have the British one, that one should be ISO, which means it has a two-row Return key (L-shape) and an additional key between LShift and Z. I do not have an ANSI keyboard at hand, because Europeans can't create XML files with an ANSI one.

@DreymaR
Copy link

DreymaR commented May 8, 2023

There are only two physical keyboard layouts in the world, ANSI and ISO, [...].

Oh no, that's wrong. There are Western form factors that adhere to neither standard (although they use the same scan code set), and there is the JIS for instance.

https://deskthority.net/wiki/ANSI_vs_ISO

European keyboards are always ISO.

Also wrong. The Czech Republic and Poland are counterexamples. I think it holds true for Western and Northern Europe, though.

Please don't claim falsehoods overconfidently.

Europeans can't create XML files with an ANSI one.

This one is also not entirely true. You're assuming that all European layouts have the <> symbols on their ISO key, which doesn't hold. Also, Europeans may easily use another system keyboard layout to produce these symbols, in addition to programs that let you type whatever you like with any underlying OS layout.

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

3 participants