Skip to content

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

Merged
merged 2 commits into from
Jan 19, 2023
Merged

Conversation

kcgen
Copy link
Member

@kcgen kcgen commented Jan 9, 2023

The mapper, keyboard, and BIOS tables are expanded to handle the oem102 and abnt1 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

@kcgen kcgen added regression We broke something 😊 backport Important fixes that should be backported labels Jan 9, 2023
@kcgen kcgen self-assigned this Jan 9, 2023
@kcgen kcgen force-pushed the kc/improve-intl1-key-1 branch from 9f54683 to 5f150e6 Compare January 9, 2023 01:50
@kcgen
Copy link
Member Author

kcgen commented Jan 9, 2023

@Grounded0 , @johnnovak, @kklobe - hoping you can check if origin/kc/improve-intl1-key-1 no longer spams ////s when hitting your right-⌘ key. Thanks!

@rsribeiro , @ ThomasEricB, hoping you can test your ABNT2 keyboards, if you can build this branch: origin/kc/improve-intl1-key-1 -- much thanks for the feedback!

@kcgen kcgen force-pushed the kc/improve-intl1-key-1 branch from 5f150e6 to 77fcf7e Compare January 9, 2023 03:19
@kcgen kcgen changed the title Expand the BIOS key set for the Intl1 key Expand the BIOS key set for the International 3 (INTL 3) key Jan 9, 2023
@johnnovak
Copy link
Member

@Grounded0 , @johnnovak, @kklobe - hoping you can check if origin/kc/improve-intl1-key-1 no longer spams ////s when hitting your right-⌘ key. Thanks!

@rsribeiro , @ ThomasEricB, hoping you can test your ABNT2 keyboards, if you can build this branch: origin/kc/improve-intl1-key-1 -- much thanks for the feedback!

Yep, first checked with main; pressing Right-Command generated / characters.
Then tried the same with this branch; the fix seems to be working.

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 😄 🚢

@Grounded0
Copy link
Collaborator

This fix reminds me of another overengineered product: 🙂
https://www.youtube.com/watch?v=lZhXFhSiQVc

@rsribeiro
Copy link
Contributor

Just had an opportunity to test it on a brazilian ABNT2 keyboard and the slash/question mark key is not working

@kcgen kcgen force-pushed the kc/improve-intl1-key-1 branch from f47dd63 to e58cd3b Compare January 9, 2023 14:55
@kcgen
Copy link
Member Author

kcgen commented Jan 9, 2023

Just had an opportunity to test it on a brazilian ABNT2 keyboard and the slash/question mark key is not working

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.

@kcgen kcgen force-pushed the kc/improve-intl1-key-1 branch from e58cd3b to 7f62ac2 Compare January 9, 2023 14:58
@rsribeiro
Copy link
Contributor

Just had an opportunity to test it on a brazilian ABNT2 keyboard and the slash/question mark key is not working

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.

Still not working :(

@kcgen
Copy link
Member Author

kcgen commented Jan 10, 2023

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).

@kcgen kcgen force-pushed the kc/improve-intl1-key-1 branch 3 times, most recently from f1f0fa3 to 449ac75 Compare January 15, 2023 01:16
@kcgen
Copy link
Member Author

kcgen commented Jan 15, 2023

@rsribeiro , @ThomasEricB

In the main branch, a new SDL key-logger has been added under the contrib/sdl_key_logger directory. You will need to compile it.

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:

INFO: DOSBox Staging SDL key logger
INFO: Quit by tapping ESC or close the GUI window
INFO:  
INFO: SCANCODE      val hex | SDLK                 val       hex |  KMOD   hex | remapped?
INFO: ~~~~~~~~~~~~~ ~~~ ~~~ | ~~~~~~~~~~~~~ ~~~~~~~~~~ ~~~~~~~~~ | ~~~~~ ~~~~~ | ~~~~~~~~~
INFO: Left Ctrl     224 e0h | Left Ctrl     1073742048 400000e0h |    64   40h | no
INFO: Left Alt      226 e2h | Left Alt      1073742050 400000e2h |   256  100h | no
INFO: Space          44 2ch | Space                 32       20h |     0    0h | no
INFO: Right Alt     230 e6h | Right Alt     1073742054 400000e6h |   512  200h | no
INFO: Right Ctrl    228 e4h | Right Ctrl    1073742052 400000e4h |   128   80h | no
INFO: PageUp         75 4bh | PageUp        1073741899 4000004bh |     0    0h | no
INFO: Up             82 52h | Up            1073741906 40000052h |     0    0h | no
INFO: PageDown       78 4eh | PageDown      1073741902 4000004eh |     0    0h | no
INFO: Right Shift   229 e5h | Right Shift   1073742053 400000e5h |     2    2h | no
INFO: Left Shift    225 e1h | Left Shift    1073742049 400000e1h |     1    1h | no
INFO: Z              29 1dh | Z                    122       7ah |     0    0h | no
INFO: X              27 1bh | X                    120       78h |     0    0h | no
INFO: C               6  6h | C                     99       63h |     0    0h | no
INFO: V              25 19h | V                    118       76h |     0    0h | no
INFO: B               5  5h | B                     98       62h |     0    0h | no
INFO:  
INFO: SCANCODE      val hex | SDLK                 val       hex |  KMOD   hex | remapped?
INFO: ~~~~~~~~~~~~~ ~~~ ~~~ | ~~~~~~~~~~~~~ ~~~~~~~~~~ ~~~~~~~~~ | ~~~~~ ~~~~~ | ~~~~~~~~~
INFO: N              17 11h | N                    110       6eh |     0    0h | no
INFO: M              16 10h | M                    109       6dh |     0    0h | no
INFO: ,              54 36h | ,                     44       2ch |     0    0h | no
INFO: .              55 37h | .                     46       2eh |     0    0h | no
INFO: /              56 38h | /                     47       2fh |     0    0h | no
INFO: Right Shift   229 e5h | Right Shift   1073742053 400000e5h |     2    2h | no
INFO: CapsLock       57 39h | CapsLock      1073741881 40000039h |  8192 2000h | no

If you can run it for your bottom two rows:

  • Left shift, ... through Right Shift, then
  • Left Ctrl ... through Right Ctrl)

And post the results, hopefully it helps progress this. Thanks!

@kcgen kcgen force-pushed the kc/improve-intl1-key-1 branch from 449ac75 to e33ed41 Compare January 15, 2023 17:58
@kcgen
Copy link
Member Author

kcgen commented Jan 15, 2023

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)

@kcgen kcgen marked this pull request as draft January 15, 2023 18:02
@rsribeiro
Copy link
Contributor

rsribeiro commented Jan 15, 2023

INFO: DOSBox Staging SDL key logger
INFO: Quit by tapping ESC or close the GUI window
INFO:
INFO: SCANCODE      val hex | SDLK                 val       hex |  KMOD   hex | remapped?
INFO: ~~~~~~~~~~~~~ ~~~ ~~~ | ~~~~~~~~~~~~~ ~~~~~~~~~~ ~~~~~~~~~ | ~~~~~ ~~~~~ | ~~~~~~~~~
INFO: Left Shift    225 e1h | Left Shift    1073742049 400000e1h |  4097 1001h | no
INFO:               100 64h | \                     92       5ch |  4096 1000h | no
INFO: Z              29 1dh | Z                    122       7ah |  4096 1000h | no
INFO: X              27 1bh | X                    120       78h |  4096 1000h | no
INFO: C               6  6h | C                     99       63h |  4096 1000h | no
INFO: V              25 19h | V                    118       76h |  4096 1000h | no
INFO: B               5  5h | B                     98       62h |  4096 1000h | no
INFO: N              17 11h | N                    110       6eh |  4096 1000h | no
INFO: M              16 10h | M                    109       6dh |  4096 1000h | no
INFO: ,              54 36h | ,                     44       2ch |  4096 1000h | no
INFO: .              55 37h | .                     46       2eh |  4096 1000h | no
INFO: /              56 38h | ;                     59       3bh |  4096 1000h | no
INFO:               135 87h | /                     47       2fh |  4096 1000h | no
INFO: Right Shift   229 e5h | Right Shift   1073742053 400000e5h |  4098 1002h | no
INFO: Left Ctrl     224 e0h | Left Ctrl     1073742048 400000e0h |  4160 1040h | no
INFO:
INFO: SCANCODE      val hex | SDLK                 val       hex |  KMOD   hex | remapped?
INFO: ~~~~~~~~~~~~~ ~~~ ~~~ | ~~~~~~~~~~~~~ ~~~~~~~~~~ ~~~~~~~~~ | ~~~~~ ~~~~~ | ~~~~~~~~~
INFO: Left Windows  227 e3h | Left Windows  1073742051 400000e3h |  5120 1400h | no
INFO: Left Alt      226 e2h | Left Alt      1073742050 400000e2h |  4352 1100h | no
INFO: Space          44 2ch | Space                 32       20h |  4096 1000h | no
INFO: Left Ctrl     224 e0h | Left Ctrl     1073742048 400000e0h |  4160 1040h | no
INFO: Right Alt     230 e6h | Right Alt     1073742054 400000e6h |  4672 1240h | no
INFO: Menu          101 65h | Menu          1073741925 40000065h |  4096 1000h | no
INFO: Right Ctrl    228 e4h | Right Ctrl    1073742052 400000e4h |  4224 1080h | no
INFO: Left Ctrl     224 e0h | Left Ctrl     1073742048 400000e0h |  4672 1240h | no
INFO: Right Alt     230 e6h | Right Alt     1073742054 400000e6h |  4672 1240h | no
INFO: Q              20 14h | Q                    113       71h |  4672 1240h | no
INFO: W              26 1ah | W                    119       77h |  4672 1240h | no
INFO: Escape         41 29h | Escape                27       1bh |  4096 1000h | no

This is the slash/question mark key:

INFO: SCANCODE      val hex | SDLK                 val       hex |  KMOD   hex | remapped?
INFO: ~~~~~~~~~~~~~ ~~~ ~~~ | ~~~~~~~~~~~~~ ~~~~~~~~~~ ~~~~~~~~~ | ~~~~~ ~~~~~ | ~~~~~~~~~
INFO:               135 87h | /                     47       2fh |  4096 1000h | no

@kcgen
Copy link
Member Author

kcgen commented Jan 15, 2023

Thanks you, @rsribeiro !

@ThomasEricB
Copy link
Contributor

ThomasEricB commented Jan 17, 2023

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:

[deck@arch sdl_key_logger]$ ./build/logger
INFO: DOSBox Staging SDL key logger
INFO: Quit by tapping ESC or close the GUI window
INFO:  
INFO: SCANCODE      val hex | SDLK                 val       hex |  KMOD   hex | remapped?
INFO: ~~~~~~~~~~~~~ ~~~ ~~~ | ~~~~~~~~~~~~~ ~~~~~~~~~~ ~~~~~~~~~ | ~~~~~ ~~~~~ | ~~~~~~~~~
INFO: `              53 35h | '                     39       27h |     0    0h |yes
INFO: 1              30 1eh | 1                     49       31h |     0    0h | no
INFO: 2              31 1fh | 2                     50       32h |     0    0h | no
INFO: 3              32 20h | 3                     51       33h |     0    0h | no
INFO: 4              33 21h | 4                     52       34h |     0    0h | no
INFO: 5              34 22h | 5                     53       35h |     0    0h | no
INFO: 6              35 23h | 6                     54       36h |     0    0h | no
INFO: 7              36 24h | 7                     55       37h |     0    0h | no
INFO: 8              37 25h | 8                     56       38h |     0    0h | no
INFO: 9              38 26h | 9                     57       39h |     0    0h | no
INFO: 0              39 27h | 0                     48       30h |     0    0h | no
INFO: -              45 2dh | -                     45       2dh |     0    0h | no
INFO: =              46 2eh | =                     61       3dh |     0    0h | no
INFO: Backspace      42 2ah | Backspace              8        8h |     0    0h | no
INFO: Tab            43 2bh | Tab                    9        9h |     0    0h | no
INFO: Q              20 14h | Q                    113       71h |     0    0h | no
INFO: W              26 1ah | W                    119       77h |     0    0h | no
INFO: E               8  8h | E                    101       65h |     0    0h | no
INFO: R              21 15h | R                    114       72h |     0    0h | no
INFO: T              23 17h | T                    116       74h |     0    0h | no
INFO: Y              28 1ch | Y                    121       79h |     0    0h | no
INFO: U              24 18h | U                    117       75h |     0    0h | no
INFO: I              12  ch | I                    105       69h |     0    0h | no
INFO: O              18 12h | O                    111       6fh |     0    0h | no
INFO: P              19 13h | P                    112       70h |     0    0h | no
INFO: [              47 2fh | '                     39       27h |     0    0h | no
INFO: ]              48 30h | [                     91       5bh |     0    0h | no
INFO: Return         40 28h | Return                13        dh |     0    0h | no
INFO: CapsLock       57 39h | CapsLock      1073741881 40000039h |  8192 2000h | no
INFO: A               4  4h | A                     97       61h |  8192 2000h | no
INFO: S              22 16h | S                    115       73h |  8192 2000h | no
INFO: D               7  7h | D                    100       64h |  8192 2000h | no
INFO: F               9  9h | F                    102       66h |  8192 2000h | no
INFO: G              10  ah | G                    103       67h |  8192 2000h | no
INFO: H              11  bh | H                    104       68h |  8192 2000h | no
INFO: J              13  dh | J                    106       6ah |  8192 2000h | no
INFO: K              14  eh | K                    107       6bh |  8192 2000h | no
INFO: L              15  fh | L                    108       6ch |  8192 2000h | no
INFO: ;              51 33h | ç                   231       e7h |  8192 2000h | no
INFO: '              52 34h | ~                    126       7eh |  8192 2000h | no
INFO: \              49 31h | ]                     93       5dh |  8192 2000h | no
INFO: Left Shift    225 e1h | Left Shift    1073742049 400000e1h |  8193 2001h | no
INFO:               100 64h | \                     92       5ch |  8192 2000h | no
INFO: Z              29 1dh | Z                    122       7ah |  8192 2000h | no
INFO: X              27 1bh | X                    120       78h |  8192 2000h | no
INFO: C               6  6h | C                     99       63h |  8192 2000h | no
INFO: V              25 19h | V                    118       76h |  8192 2000h | no
INFO: B               5  5h | B                     98       62h |  8192 2000h | no
INFO: N              17 11h | N                    110       6eh |  8192 2000h | no
INFO: M              16 10h | M                    109       6dh |  8192 2000h | no
INFO: ,              54 36h | ,                     44       2ch |  8192 2000h | no
INFO: .              55 37h | .                     46       2eh |  8192 2000h | no
INFO: /              56 38h | ;                     59       3bh |  8192 2000h | no
INFO:               135 87h | /                     47       2fh |  8192 2000h | no
INFO: Right Shift   229 e5h | Right Shift   1073742053 400000e5h |  8194 2002h | no
INFO: Left Ctrl     224 e0h | Left Ctrl     1073742048 400000e0h |  8256 2040h | no
INFO: Left Alt      226 e2h | Left Alt      1073742050 400000e2h |  8448 2100h | no
INFO: Space          44 2ch | Space                 32       20h |  8192 2000h | no
INFO: Right Alt     230 e6h | Right Alt     1073742054 400000e6h |  8704 2200h | no
INFO: Menu          101 65h | Menu          1073741925 40000065h |  8192 2000h | no
INFO: Right Ctrl    228 e4h | Right Ctrl    1073742052 400000e4h |  8320 2080h | no
INFO: F1             58 3ah | F1            1073741882 4000003ah |  8192 2000h | no
INFO: F2             59 3bh | F2            1073741883 4000003bh |  8192 2000h | no
INFO: F3             60 3ch | F3            1073741884 4000003ch |  8192 2000h | no
INFO: F4             61 3dh | F4            1073741885 4000003dh |  8192 2000h | no
INFO: F5             62 3eh | F5            1073741886 4000003eh |  8192 2000h | no
INFO: F6             63 3fh | F6            1073741887 4000003fh |  8192 2000h | no
INFO: F7             64 40h | F7            1073741888 40000040h |  8192 2000h | no
INFO: F8             65 41h | F8            1073741889 40000041h |  8192 2000h | no
INFO: F9             66 42h | F9            1073741890 40000042h |  8192 2000h | no
INFO: F10            67 43h | F10           1073741891 40000043h |  8192 2000h | no
INFO: F11            68 44h | F11           1073741892 40000044h |  8192 2000h | no
INFO: F12            69 45h | F12           1073741893 40000045h |  8192 2000h | no
INFO: Up             82 52h | Up            1073741906 40000052h |  8192 2000h | no
INFO: Down           81 51h | Down          1073741905 40000051h |  8192 2000h | no
INFO: Left           80 50h | Left          1073741904 40000050h |  8192 2000h | no
INFO: Right          79 4fh | Right         1073741903 4000004fh |  8192 2000h | no
INFO: Keypad 0       98 62h | Keypad 0      1073741922 40000062h |  8192 2000h | no
INFO: Keypad 1       89 59h | Keypad 1      1073741913 40000059h |  8192 2000h | no
INFO: Keypad 2       90 5ah | Keypad 2      1073741914 4000005ah |  8192 2000h | no
INFO: Keypad 3       91 5bh | Keypad 3      1073741915 4000005bh |  8192 2000h | no
INFO: Keypad 4       92 5ch | Keypad 4      1073741916 4000005ch |  8192 2000h | no
INFO: Keypad 5       93 5dh | Keypad 5      1073741917 4000005dh |  8192 2000h | no
INFO: Keypad 6       94 5eh | Keypad 6      1073741918 4000005eh |  8192 2000h | no
INFO: Keypad 7       95 5fh | Keypad 7      1073741919 4000005fh |  8192 2000h | no
INFO: Keypad 8       96 60h | Keypad 8      1073741920 40000060h |  8192 2000h | no
INFO: Keypad 9       97 61h | Keypad 9      1073741921 40000061h |  8192 2000h | no
INFO: Numlock        83 53h | Numlock       1073741907 40000053h | 12288 3000h | no
INFO: Keypad /       84 54h | Keypad /      1073741908 40000054h | 12288 3000h | no
INFO: Keypad *       85 55h | Keypad *      1073741909 40000055h | 12288 3000h | no
INFO: Keypad -       86 56h | Keypad -      1073741910 40000056h | 12288 3000h | no
INFO: Keypad +       87 57h | Keypad +      1073741911 40000057h | 12288 3000h | no
INFO: Keypad Enter   88 58h | Keypad Enter  1073741912 40000058h | 12288 3000h | no
INFO: AudioPlay     261 105h | AudioPlay     1073742085 40000105h | 12288 3000h | no
INFO: AudioNext     258 102h | AudioNext     1073742082 40000102h | 12288 3000h | no
INFO: AudioPrev     259 103h | AudioPrev     1073742083 40000103h | 12288 3000h | no
INFO: AudioStop     260 104h | AudioStop     1073742084 40000104h | 12288 3000h | no
INFO: Numlock        83 53h | Numlock       1073741907 40000053h | 12288 3000h | no
INFO: ScrollLock     71 47h | ScrollLock    1073741895 40000047h | 45056 b000h | no
INFO: Pause          72 48h | Pause         1073741896 40000048h | 45056 b000h | no
INFO: Insert         73 49h | Insert        1073741897 40000049h | 45056 b000h | no
INFO: Home           74 4ah | Home          1073741898 4000004ah | 45056 b000h | no
INFO: PageUp         75 4bh | PageUp        1073741899 4000004bh | 45056 b000h | no
INFO: Delete         76 4ch | Delete               127       7fh | 45056 b000h | no
INFO: End            77 4dh | End           1073741901 4000004dh | 45056 b000h | no
INFO: PageDown       78 4eh | PageDown      1073741902 4000004eh | 45056 b000h | no
INFO: Escape         41 29h | Escape                27       1bh | 45056 b000h | no

@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)!

firefox_32IwKMQplJ

@rsribeiro
Copy link
Contributor

INFO: DOSBox Staging SDL key logger
INFO: Quit by tapping ESC or close the GUI window
INFO:
INFO: SCANCODE      val hex | SDLK                 val       hex |  KMOD   hex | remapped?
INFO: ~~~~~~~~~~~~~ ~~~ ~~~ | ~~~~~~~~~~~~~ ~~~~~~~~~~ ~~~~~~~~~ | ~~~~~ ~~~~~ | ~~~~~~~~~
INFO: 0              39 27h | 0                     48       30h |  4096 1000h | no
INFO: -              45 2dh | -                     45       2dh |  4096 1000h | no
INFO: =              46 2eh | =                     61       3dh |  4096 1000h | no
INFO: Backspace      42 2ah | Backspace              8        8h |  4096 1000h | no
INFO: P              19 13h | P                    112       70h |  4096 1000h | no
INFO: [              47 2fh | ´                   180       b4h |  4096 1000h | no
INFO: ]              48 30h | [                     91       5bh |  4096 1000h | no
INFO: Return         40 28h | Return                13        dh |  4096 1000h | no
INFO: ;              51 33h | ç                   231       e7h |  4096 1000h | no
INFO: '              52 34h | ~                    126       7eh |  4096 1000h | no
INFO: \              49 31h | ]                     93       5dh |  4096 1000h | no
INFO: ,              54 36h | ,                     44       2ch |  4096 1000h | no
INFO: .              55 37h | .                     46       2eh |  4096 1000h | no
INFO: /              56 38h | ;                     59       3bh |  4096 1000h | no
INFO:               135 87h | /                     47       2fh |  4096 1000h | no
INFO:
INFO: SCANCODE      val hex | SDLK                 val       hex |  KMOD   hex | remapped?
INFO: ~~~~~~~~~~~~~ ~~~ ~~~ | ~~~~~~~~~~~~~ ~~~~~~~~~~ ~~~~~~~~~ | ~~~~~ ~~~~~ | ~~~~~~~~~
INFO: Right Shift   229 e5h | Right Shift   1073742053 400000e5h |  4098 1002h | no
INFO: `              53 35h | '                     39       27h |  4096 1000h | no
INFO: Escape         41 29h | Escape                27       1bh |  4096 1000h | no

@kcgen kcgen force-pushed the kc/improve-intl1-key-1 branch from e33ed41 to 5eb559b Compare January 18, 2023 21:41
@kcgen kcgen changed the title Expand the BIOS key set for the International 3 (INTL 3) key Handle OEM102 and ABNT1 keyboard scancodes Jan 18, 2023
@kcgen kcgen force-pushed the kc/improve-intl1-key-1 branch 2 times, most recently from 5c163ec to 8f2dc51 Compare January 18, 2023 22:07
@kcgen
Copy link
Member Author

kcgen commented Jan 18, 2023

@ThomasEricB , @rsribeiro , when you have a chance to fetch and compile the updates on branch: origin/kc/improve-intl1-key-1, try launching with the Brazilian language (dosbox -lang br), and try your \ and / keys, left and right sides on the bottom row.

I was able to test them with: dosbox -lang br -c "autotype oem102 abnt1"

@kcgen kcgen marked this pull request as ready for review January 18, 2023 22:10
@kcgen kcgen force-pushed the kc/improve-intl1-key-1 branch from 8f2dc51 to 42e8e84 Compare January 19, 2023 02:21
@kcgen
Copy link
Member Author

kcgen commented Jan 19, 2023

@FeralChild64 , I've re-based this on the updated KBD_KEYS enum groupings.

I placed the OEM102 (\|) and ABNT1 (/?) keys along with the other symbols:

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:
2023-01-18_18-28

@FeralChild64
Copy link
Collaborator

@kcgen Sure, I just wanted to have a readable list.

@ThomasEricB
Copy link
Contributor

ThomasEricB commented Jan 19, 2023

@ThomasEricB , @rsribeiro , when you have a chance to fetch and compile the updates on branch: origin/kc/improve-intl1-key-1, try launching with the Brazilian language (dosbox -lang br), and try your \ and / keys, left and right sides on the bottom row.

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 2023-01-19 15:36:22.778 | LANG: The 'br' language resource file could not be loaded, using internal English messages, DOSBox Staging managed to load the correct codepage informing 2023-01-19 15:36:23.724 | LAYOUT: Loaded codepage 860 for detected language br. Due to this, It was able to read my keyboard inputs as you can see below:

Discord_1bX3VNFl11

@kcgen kcgen force-pushed the kc/improve-intl1-key-1 branch from 42e8e84 to c7462dd Compare January 19, 2023 21:13
@kcgen
Copy link
Member Author

kcgen commented Jan 19, 2023

Add handling for a new key

Graphical depiction corresponding to the notes included with the SDL key logger (open fullscreen in 4k):

guide_to_adding_keys

@kcgen
Copy link
Member Author

kcgen commented Jan 19, 2023

Notes for using the "ticks" dead-key, to the right of P:

  • Ensure you're using codepage 860 or have started up with the Brazilian language: dosbox -lang br.
  • Press the "ticks" key once followed by any character (or space). A back-tick will be produced along-side the character.
  • Use Shift + the "ticks" key followed by any character (or space) to produce an inward-tick.

@kcgen kcgen force-pushed the kc/improve-intl1-key-1 branch from c7462dd to 0efab25 Compare January 19, 2023 21:20
@kcgen
Copy link
Member Author

kcgen commented Jan 19, 2023

Thanks for testing this, @ThomasEricB!
Let's merge.

@kcgen kcgen merged commit 439da32 into main Jan 19, 2023
@delete-merged-branch delete-merged-branch bot deleted the kc/improve-intl1-key-1 branch January 19, 2023 21:24
@johnnovak johnnovak added the input handling Issues related to handling any input (keyboard, mouse, joystick & game controllers) label Dec 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport Important fixes that should be backported input handling Issues related to handling any input (keyboard, mouse, joystick & game controllers) regression We broke something 😊
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Pressing right side Command key inserts "/" character
6 participants