KeyMapper
KeyMapper copied to clipboard
Option to detect triggers by scan code instead of key code
Developer TODO (don't remove)
- [ ] create new branch. put issue number at start of name if not a very quick fix.
- [ ] write tests. put issue number in comment
- [ ] Save scan code with the trigger key
- [ ] Create a "Enable extra compatibility options" toggle in the settings. Have a button that links to a page on the website that explains which options are now visible.
- [ ] Create a trigger key option that uses the scan code rather than the key code to detect the key. This should only be visible if the compatibility options are visible.
- [ ] update known issues in the documentation
- [ ] squash and merge
- [ ] delete branch
Discord message link/email recipient https://discord.com/channels/717499872219103263/717527256091721735
Describe the bug
This issue created after I report the same issue on the discord link above, and sds100 suggest me create an issue here.
I need to remap one of the two "\" keys of the Samsung Tab S7+ with a bilingual (English+French) keyboard. It has layout difference with standard keyboard below. what I want to map is only the left "" (red "L" label)., while keep the right "" for its original function.
Fig.1 a comparison of my keyboard (right) with standard keyboard(left) .
After installing the Key Mapper app on the tablet (OS version Android 11).In "Trigger and actions" --> "RECORD TRIGGER", it does not separate the two "\" keys, so if I map the left "\" key, the right "\" will also mapped. I tried to record the right "\" key, it results in the same Trigger.
Fig2. my key mapping configuration.
How can I separate the two physical keys both "\" during mapping? Thx
To Reproduce Steps to reproduce the behavior: please see the screenshot above
Upload a backup of your keymaps. (Follow the guide here.)[https://sds100.github.io/KeyMapper/user-guide/backup-restore]
Expected behavior
A clear and concise description of what you expected to happen.
left key will be mapped, but right "\" is also mapped. however, I want to keep the right "" works as it was designed.
Screenshots
If applicable, add screenshots to help explain your problem. please see above.
Smartphone (please complete the following information):
- Device: [Samsung Tab S7+
- Android version: Android 11
Additional context
Add any other context about the problem here.
This may not be a fixable problem, as ive notice manufacturers like to do lazy things, such as have two keys input the same keycode, which I speculate here. If you dont think this is the case, you could probably test with another application that shows what keys are being pressed, or pair the keyboard with a computer, and try it there as well.
Interesting, yeah this might not be fixable if Android doesn't let you differentiate between the two keys. Do they input the same character when you type? Can you install this app https://play.google.com/store/apps/details?id=aws.apps.keyeventdisplay, press the buttons in question and then send me a screenshot of the output. Thanks!
thank you for the reply! here are the TWO keys : ​(first 2rows as one key, the latter 2 rows is another key, they both show as "/" when being pressed)
Press buttons to see the keycodes: KeyDown : action=0 code=73 repeat=0 meta=0 scanCode=86 flags=8 label='92' chars='null' number='0' KeyUp : action=1 code=73 repeat=0 meta=0 scanCode=86 flags=8 label='92' chars='null' number='0' KeyDown : action=0 code=73 repeat=0 meta=0 scanCode=43 flags=8 label='92' chars='null' number='0' KeyUp : action=1 code=73 repeat=0 meta=0 scanCode=43 flags=8 label='92' chars='null' number='0'
Okay, so they have the same key code but a different scan code which means I need to add an option to detect a trigger by it's scancode instead of key code.
Thank you Seth, will look forward to the new version after update!