M
MechaKeys2y ago
inx

Certain language keyboard layouts result in double sounds

Not sure if this can even be feasibly fixed, but certain keyboard layouts, in my case Polish, press multiple keys at once sometimes. When I press Right Alt, the keyboard layout also automatically presses left control, as seen in the video. This results in mechakeys detecting two inputs and two sounds played, which sounds weird. As I said, not sure if this can be fixed or if it's even worth it, just wanted to let you guys know that this happens sometimes
5 Replies
inx
inxOP2y ago
accidentally recorded with no sound wait a sec
inx
inxOP2y ago
halu
halu2y ago
i have a similar issue when running on a VM, there are some actions that are mapped to multiple keypresses so i hear up 4 keys at once. its not an easy fix unfortunately. some potential routes: 1. irl keyboards have a scan rate, if these simulated keypresses happen at the same time, i might be able to ignore them on that basis 2. lang specific keyboard overrides (not a fan of this idea) 3. add the ability to fix when we add custom soundpacks
inx
inxOP2y ago
how does the first route work? wouldn't that also trigger if the user simply presses two keys at the same time?
halu
halu2y ago
there’s actually 2 processes at play when detecting keypresses: 1. the keyboard keeping tab of whats pressed 2. the computer asking the keyboard for its current state there can be some variation in how different hardware and software handle the specifics, but that principle is pretty universal. it is possible that some devices allow for simultaneous inputs, but thats usually not the case. they usually cycle through each input checking its state which also ensure a unique time of input. on top of that, the probability of a user pressing two keys at the exact same time down to the millisecond (or faster) is not as common a situation as one may think actually, @inx you could prob help me test the viability of option 1 in the experimental section of v2, there is a section called “typing rate” in the first part of that section, you’ll see list item called “2 keys:” 1. try pressing keys at the same time (the max i can get is 500) 2. try pressing “right alt” and see what number (if any) it gives you If the simulated press happens at the same time, it might break or give infinity if you get a number instead… this option wont work nvm, tested myself even the simulated stroke has a unique timestamp so the result is a number (~200 keys/sec in my case) unfortunately, this is lower than 500... which means there's no way to differentiate the two without some more specific logic well cuz its just two keys in thi case, we could just mute right alt… then let the second sound be heard with per-key settings, that could be a thing. still doesnt solve the problem at large tho
Want results from more Discord servers?
Add your server