kiibohd / KiiConf

Input Club web configurator, designed by matt3o.
http://configurator.input.club
GNU General Public License v3.0
92 stars 30 forks source link

Configurator not handling users with other layouts properly #14

Open sigboe opened 9 years ago

sigboe commented 9 years ago

The issue is that while using Norwegian layout, and presumably other layouts as well. It seams to me an arbitrary different key may be placed presses while pressing some keys using a Norwegian layout. Keep in mind I have not tried flashing a layout that looks wrong deliberately. (still waiting for my Infinity 60% and Infinity ErgoDox). However it does not seam to reflect this quote from the Wiki: The resulting key is what you should assign in the configurator.

Example:

I hope the examples suffice there are at least two other wrong, but I cant type them because they include the character used for code in Mardown. The rest seam to be correct, I am fairly certain I tried them all. Also the Norwegian > which is equivalent of british \, but thats really not a big issue and I believe you are aware of that.

Workaround: User sets their input language to US English while using the configurator.

Proposed resolution: Get the keys to at least insert the appropriate key, no matter the input language of the OS. Even though they don't match up with what is visible on the key, but they would match up with the US equivalent so it would work.

Resolution most wanted: Support for different locales. So while using the configurator, you would pick your keyboard locale, and it would display the keys for that locale as well as flash the expected layout.

Will give more information if needed

haata commented 9 years ago

Haha, yep. Definitely an issue.

I like the idea of having the user select which locale they are using. Then the configurator would have a sort of "conversion map" and display what the user would actually be typing (heck, KLL should have something like this too).

I'm a pretty awful webdev, so it might take me a while to implement something. Backend wise, it's pretty straightforward because I'd just add keyboard locales as requested.

sigboe commented 9 years ago

@haata I presume that the hard part is to get the configurator to recognise the correct key while using a different locale. I don't see any pattern in how it is going wrong. Maybe you know why its going wrong, or at least can figure it out.

I think you can figure out how to do the converison map with very few and minute changes in the webdev side, if you just figure out how to place a dynamic object instead of the displayed character. Then the rest could surly be done in backend. Maybe I am wrong, or maybe I am promoting bad practice coding?

If I understand you correctly KLL should have something like this too You mean so the keyboard would output the correct language key, no OS conversion? If so it could enable a score of new possibilities. Example, the girlfriend could want a layer of Cyrillic letters so she would have the possibility to switch to or hold a button to enable typing in Russian. Right now she of course has hotkeys to change the input language, I actually had to disable Win8/10 settings syncing to my job laptop, I could find my self suddenly typing in Cyrillic at work. Another example could make the 60% an even better travel companion, if you could BYOKeyboard and just type with the correct keys. Or did you in fact mean something different?

haata commented 9 years ago

Haha, yes, no OS conversion would be the holy grail. Unfortunately this isn't possible within the USB HID spec.

That's not to say I can't go around it, but this would require a sort of OS-Level driver/userspace application that outputs unicode directly. I know how I'd implement such a thing but it comes down to time and OS support (I want Win/Linux/Mac support).

nilrog commented 8 years ago

It's me from the Massdrop discussion that was reporting that the above workaround didn't work for me for all keys :)

I have successfully managed to map 'åäö' using the workaround. But I have not been able to map the '|' key (containing '<>|') which is left of the 'z' key on a Swedish keyboard (this is a picture of a Swedish keyboard, https://upload.wikimedia.org/wikipedia/commons/thumb/e/e0/KB_Sweden.svg/2000px-KB_Sweden.svg.png). The problem is that even if I switch to us-en layout the configurator doesn't ever register that you press that key.

I still haven't tried to map all they keys so there might be more that are problematic. So far i'm just experimenting trying to find out how I want the layout to look like. If I discover more keys I will add them here.

sigboe commented 8 years ago

@nilrog Hey, key containting < and > should be the only key on a Swedish keyboard not working with this workaround. You can map this key using the ISO/ button under the International tab in the configurator.

Kanon! :smile:

nilrog commented 8 years ago

Thanks @sigboe That fixed my issue with the | sign. Now I just need to figure out how I want to map all the keys :)

sigboe commented 8 years ago

@nilrog What keyboard?

nilrog commented 8 years ago

The Infinity ErgoDox.

sigboe commented 8 years ago

@nilrog Here is my scandinavian layout. Its WIP but I use it as my daily driver and there is a layer for gaming.

http://www.keyboard-layout-editor.com/#/gists/b5a65c238cd970beff8a

nilrog commented 8 years ago

Great, thanks again. Interresting to see how others have mapped their keys :)

hymnis commented 8 years ago

Have been using an US ANSI keyboard with the swerty layout (http://johanegustafsson.net/projects/swerty/) for a while now and it's pretty nice. A little weird at first if your'e used to ISO, but a good fit for programming. I have even started using swerty on ISO keyboards. Anyways, it makes for easy key mapping as the keyboard is pretty much ANSI standard.

sigboe commented 8 years ago

@hymnis Hmm, makes me want to switch to that layout for the sole reason of it being easier to get keycaps. Just having regular US ANSI keycaps and knowing where Ä Ö Å is (of course as a Norwegian I would need to change it to Æ Ø Å)

The only hanicap I see in this setup is that it requires an install. I will try to experiment with just having it work on the OS level with US keyboard layout and doing the rest in firmware on my Keyboards.

dhardy commented 8 years ago

I also can't enter some keys in the configurator. I have a highly customised ErgoDox here. [ is AltGr+A (mapped in the OS for various reasons); pressing this in the configurator just gets A (ignoring the AltGr). The key that would report [ with a US-keyboard layout in the OS is mapped to ö, and doesn't result in anything in the configurator.

The easiest solution would be to just show all keyboard keys below to allow mouse picking.

An OS driver letting me skip the OS keyboard layer entirely and program any unicode sequence in the keyboard itself would be great by the way, but until then I will continue doing most of the mapping in the OS so that "standard" keyboards (e.g. laptop keyboard) can be remapped too (I use Colemak + custom third and fourth layers + modifications).

sigboe commented 8 years ago

@dhardy What you are describing to do is to create a simple macro. A GUI way to handle simple macros is an upcoming feature as far as I know.

dhardy commented 8 years ago

@sigboe what's a "simple macro"? Something like making the keyboard emit 'Shift' + '1' simultaneously to yield '!' ? Then no.

As I said, I use the OS keyboard layer (XKB) to do most of the configuration (seriously, without being able to emit Unicode directly, there is no way the keyboard could do much of what my layout does, like ←→ or αβγ or çäàßtake a look if you're interested).

johan-bjareholt commented 8 years ago

Is there any progress on this?

I still have a second keyboard on my desk because of this and would love to put that one in my wardrobe.

haata commented 8 years ago

I'm in the process of a big KLL compiler rewrite right now. It should be possible to add support in for this around the same time. The goal is to make it so adding features like this don't take so long to add (the old compiler made my brain melt whenever I looked at it...).

altemark commented 8 years ago

Any progress on this? Having a hard time getting Å Ä Ö working ... Lovely work otherwise :) But this should be an essential feature too.

jbondeson commented 8 years ago

@altemark a little I now have an ISO Whitefox sitting on my desk and have gotten an ISO-DE layout working. At this point I just need to start sourcing what each of the different layouts look like so it can do translation on the client side.

jbondeson commented 8 years ago

To elaborate a little now that I have collapsible regions the thought is to show a region specific keyboard to allow a touch input of any key. Then you wouldn't even need to have another keyboard which for that region.

johan-bjareholt commented 8 years ago

@altemark I have gotten that to work actually with a swedish layout

ÅÄÖ is the easy part, getting tilde and pipes working was the hard ones to find out. It should be of great help if you are using some nordic layout since they are similar.

https://gist.github.com/johan-bjareholt/8c2623782d3fba158c84fa0ac2ba6882