-
Notifications
You must be signed in to change notification settings - Fork 29
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
fix(klc): Correct VK in the KLC #104
Conversation
I agree we could totally change this |
Which one? The one left of [Z] or the one on the right of the homerow? |
The ISO key has many names — IntlBackslash, Non-US Backslash, LSGT, 102d… but it’s always the same, i.e. the one between Shift and [Z]. |
I add special handling for the ISO key assuming its scancode is 56. I’ve updated the `test_intl_deadkeys` test as it was missing a line due to my fix of the 1dk case.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a valuable move forward and it does solve the issue we’re facing with Ergo‑L at the moment, but I think we should aim for a more “single-responsibility” approach while we’re at it. Namely :
- the
klc
data inkey_codes.yaml
should be just a dictionary associating XKB identifiers to scan codes (numbers in hex format would be nice here), like for the other dicts in that data file ; - the
VK
thing should probably be implemented as a dedicated KLC function inlayout.py
, to make it easier to read and debug.
Did you meant "dedicated KLC function in |
I totally meant that, sorry for the confusion. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good ! I’ve left a couple comments but nothing worth blocking the PR.
I’ve refactored the
key_codes.yaml
as VK are not bound to SC.There’s also a change to make the double 1dk works again, but it breaks
test_intl_deadkeys
but I think the test needs to be updated.test_intl_keymap
is also broken, but this time, I’m unsure of the correct path to fix it.I produce:
when the test is expecting:
Which means my asumption that a char and a VK have a link is also wrong :-/
Need your insight on this :)
EDIT: I think the intl.toml is wrong. We have
\ |
two times. From what I’ve seen on pictures, they often change one of them to something else (<>
or#
or "`")