Skip to content
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

WhiteFox started dropping inputs and holding down keys while in 6KRO mode #78

Open
r3Fuze opened this issue May 16, 2017 · 11 comments
Open

Comments

@r3Fuze
Copy link

r3Fuze commented May 16, 2017

I have to run my keyboard in 6KRO mode because some ISO keys don't work in NKRO. See this issue: #70

Everything had been running fine in 6KRO for several months until my keyboard randomly decided to randomly not send key inputs and some times never release the keys until I press them again. I know its an issue with 6KRO because when I switch to NKRO the problem goes away but then I can't use some of my keys.

I don't really have much information I can give because I have no idea what is causing this, but let me know if you need anything.

@DarkDefender
Copy link

DarkDefender commented May 21, 2017

@r3Fuze as a fix for the ISO# issue:

I don't know why the ISO# mapping even exists, just bind the key to "\" instead and it will work flawlessly.
At least, it does for me with the swedish keyboard layout.

This works because if you look at the ANSI keyboard layout the ISO enter key cover the " \" key. This key is then "moved" down to the "ISO#" position. So if you map the ISO# key to the ANSI "\" keycode the OS will do the right thing regardless of keyboard layout set.

Perhaps you can try to reflash your keyboard with the latest firmware regardless? I had a problem with LEDs turning off if I didn't unplug the keyboard for a few weeks. However that issue seems to be gone now when I reflashed it with a newer firmware version.

@jbondeson
Why isn't the "ISO#" simply mapped to the "\" keycode? I had this problem at first when I got my keyboard and tried to map the keys correctly to the ISO layout. But after thinking a while, I mapped it to "\" and now it works perfectly in Linux with NRKO.

@r3Fuze
Copy link
Author

r3Fuze commented May 21, 2017

@DarkDefender Did you use the online configurator or build the keymap yourself, because I can't find any way to insert a backslash in the configurator.

@DarkDefender
Copy link

DarkDefender commented May 21, 2017

@r3Fuze Yes, I used the online configurator.

Hmm, I see now that the backslash key is on the "<>" key on the danish layout. (It is next to the 0 key on the swedish one).

I can simply type backslash with altgr+that key. Are you saying that it doesn't work for you with altgr+">< key"?

If that is the case I've uploaded my config here:
https://gist.github.com/DarkDefender/456e319e713a8534af9b957a2882a792

You can try to use it if you like. Just copy the code and paste it in the "import map" window in the online configurator

@r3Fuze
Copy link
Author

r3Fuze commented May 21, 2017

@DarkDefender When I try to type a symbol that requires a modifier like shift or alt, it just registers the modifier and never the symbol.
Edit: Not all keys but some of them.

I'll try modifying your map to see if it works. Thanks.

@r3Fuze
Copy link
Author

r3Fuze commented May 21, 2017

@DarkDefender Replacing ISO# with backslash seems to have worked. I'll roll with this for now. Thanks!

@DarkDefender
Copy link

@r3Fuze Nice! I guess that is works in NKRO mode also? And you are still on windows, correct?
You can try the NKRO out here:
https://www.microsoft.com/appliedsciences/KeyboardGhostingDemo.mspx

@r3Fuze
Copy link
Author

r3Fuze commented May 21, 2017

@DarkDefender I'm on Windows and this works in both 6KRO and NKRO.

@DarkDefender
Copy link

DarkDefender commented May 26, 2017

@haata maybe you can chime in on why ISO# != ANSI \ ?
To me, it seems like they should have the same keycode.

@haata
Copy link
Member

haata commented May 26, 2017

It's probably a historical AT->PS/2->USB HID thing. Depending on which locale you have set on your OS, USB Codes are interpreted in different ways. This is really annoying, and while I'm working on ways to simplify this, it's defined in the USB spec so there's not a lot I can do about it.

Another thing I'm working on that may help is using unicode directly instead of USB Codes, then using a driver on the host side to figure out what keys should be which. This won't work in BIOS mode however, and so it still requires me to handle the USB spec correctly.

@DarkDefender
Copy link

@haata I'm just wondering which one is the "correct" keycode to use here. It seems like for me and fuze that the ANSI\ keycode just works fine. And because the ISO# only works in 6KRO, I don't really see the need to have it in the configurator. Well, we need to have something to bind the correct keycode, but it seems to me that ANSI\ keycode should be used instead (because it works in both 6KRO and NKRO).

I'm wondering when the ISO# should be used. On my other swedish/nordic PS2 and USB keyboards, it seems like that specific key is bound to ANSI\ and not ISO#.

@DarkDefender
Copy link

DarkDefender commented May 26, 2017

BTW, found this in the SDL wiki:
https://wiki.libsdl.org/SDL_Keycode

"#" (ISO USB keyboards actually use this code instead of 49 for the same
key, but all OSes I've seen treat the two codes identically. So, as an
implementor, unless your keyboard generates both of those codes and your
OS treats them differently, you should generate SDL_SCANCODE_BACKSLASH
instead of this code. As a user, you should not rely on this code
because SDL will never generate it with most (all?) keyboards.)

So it would seem like it is rarely used in practice. (That is, for most if not all OSes, ANSI\==ISO#)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants