-
-
Notifications
You must be signed in to change notification settings - Fork 172
Handle OEM102 and ABNT1 keyboard scancodes #2209
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
Conversation
9f54683
to
5f150e6
Compare
@Grounded0 , @johnnovak, @kklobe - hoping you can check if @rsribeiro , @ ThomasEricB, hoping you can test your ABNT2 keyboards, if you can build this branch: |
5f150e6
to
77fcf7e
Compare
Yep, first checked with Haven't regression tested the keyboard input extensively, though. We'll regression test it anyway in the coming weeks / months. So looks good, ship it 😄 🚢 |
This fix reminds me of another overengineered product: 🙂 |
Just had an opportunity to test it on a brazilian ABNT2 keyboard and the slash/question mark key is not working |
f47dd63
to
e58cd3b
Compare
Thanks for the quick test, @rsribeiro. I've made another commit to try to fix it: using SDL's INTL 1 scan code instead of INTL 3 (even though, according to http://www.quadibloc.com/comp/scan.htm, the key is called INTL 3). Fingers crossed this does the trick. |
e58cd3b
to
7f62ac2
Compare
Still not working :( |
Darn; I will add some logging around the SDL event side and the emulated BIOS side, and try to figure this out. Will let you know when that's ready (hopefully tomorrow). |
f1f0fa3
to
449ac75
Compare
In the It's a small stand-alone tool that hopefully will help us figure out the connection between the extra ABNT2 keys and how SDL identifies them. Build notes here: https://github.com/dosbox-staging/dosbox-staging/tree/main/contrib/sdl_key_logger Sample output:
If you can run it for your bottom two rows:
And post the results, hopefully it helps progress this. Thanks! |
449ac75
to
e33ed41
Compare
Moving this PR to draft for now, pending feedback from @rsribeiro , @ThomasEricB (or anything else with an ABNT2 keyboard who can get some data from it, mentioned here: #2209 (comment) |
This is the slash/question mark key:
|
Thanks you, @rsribeiro ! |
Unfortunately, I don't know how to enable ABNT 2 on the Steam Deck... Here is my keyboard's default keys in ABNT1 for future reference:
@rsribeiro If you could provide the rest of the keyboard especially the keys between P and Enter, L and Enter, M and Right Shift + \ for @kcgen that would be great (AND NEEDED)! |
|
e33ed41
to
5eb559b
Compare
5c163ec
to
8f2dc51
Compare
@ThomasEricB , @rsribeiro , when you have a chance to fetch and compile the updates on branch: I was able to test them with: |
8f2dc51
to
42e8e84
Compare
@FeralChild64 , I've re-based this on the updated I placed the OEM102 ( KBD_grave, KBD_minus, KBD_equals, KBD_backslash,
KBD_leftbracket, KBD_rightbracket,
KBD_semicolon, KBD_quote,
KBD_oem102, KBD_period, KBD_comma, KBD_slash, KBD_abnt1,
Placed on the 4th row at start and end like on the keyboard: |
@kcgen Sure, I just wanted to have a readable list. |
Thank you @kcgen for building an action for this so I could download the file (i'm to lazy to setup another folder). Even though it said |
42e8e84
to
c7462dd
Compare
Add handling for a new keyGraphical depiction corresponding to the notes included with the SDL key logger (open fullscreen in 4k): |
Notes for using the "ticks" dead-key, to the right of P:
|
c7462dd
to
0efab25
Compare
Thanks for testing this, @ThomasEricB! |
The mapper, keyboard, and BIOS tables are expanded to handle the
oem102
andabnt1
keys (found on Brazilian ABNT2 keyboards).The left and right windows keys are given their correct scancodes (91 and 92).
Ref: http://www.quadibloc.com/comp/scan.htm, thanks to @FeralChild64 for this.
Non-functional changes:
The BIOS table of keys is moved inside an accessor function where the lookup index is validated.
Each key in the BIOS table of keys is prefixed with its index as a comment. This can be used as a debugging aid, for example: you can directly lookup the key being used by printing the index.
Type narrowing is fixed and checked (as a separate commit)
Fixes #2199