Add Hungarian keyboard layout.#102
Conversation
Modified from the already existing german layout. Based the layout mostly on my IRL keyboard, with some extra functionality present on hungarian layouts i've seen online.
|
Looks good to me. Thank you for your efforts. Before I just merge though, the shift sub-layout numpad is an interesting approach. But isn't Insert missing on the numpad 0 key then? |
|
The shift sub-layout on the numpad is just how it behaves under windows, yes including shift+numpad 0 acting as shift+insert. |
-Added insert key in the shift sub-layout on numpad 0 -Changed the label of "NumL" to "Num\nLock"
|
I vaguely remembered having a reason not to have different sub-layouts for the numpad in the official keyboard layouts, so I checked out how the numpad input simulation actually behaved (something I have to admit to never really have done beyond the simple key presses). Desktop+'s numpad input simulation is inadequate to say the least. Major issue is that the shift state gets stuck for some reason when used with numpad keys (seemingly only those). Whether Shift+numpad key actually holds shift on a real keyboard also depends on the numlock state it seems. None of this has your keyboard layout at fault. You basically made me check properly for once and now I want to fix this for all layouts. I'll report back after I had time sorting that little mess out. Thanks again. |
|
For reference on windows with an IRL keyboard (at least on hungarian keyboards): So it seems that when num lock is off, the key simply behaves like it would when pressed together with shift. A possible, but still not perfect solution (if all else fails) would be to make it so that the numpad keys switch to the numpad layer keys (like in this layout) only when num lock is off. I indeed tried to accomodate for this by approximating the shift+numkey behavior by modifying the layout, but indeed this can come off as kinda janky and is probably only optimal for pure text input, and likely not other use cases. Also it doesn't accomodate for users who are used to having num lock off and shift+numkey just toggling the num lock layered keys. Thanks for being thorough with this and looking into it, this is the sort of issue that usually doesn't even get noticed (at least until one user tries doing something specific and gets confused and frustrated). |
|
Sorry for the delay. I've pushed something that I believe results in correct numpad behavior when using the normal numpad keycodes now. I'm not too sure what to do about the labeling, however. I am toying with the idea of optional indicators on the various toggle keys (would be a global setting, nothing layout specific), but accurate reactive numpad labels might be more trouble than worth. All of this aside, while I'd lean towards using the same keycodes and maybe also labels on the shift sub-layout now, I'm not really looking to judge community keyboard layouts harshly. So just go with what you feel like. |
|
That labeling would also work, sure. Only thing that bothers me there is the 5. An empty second line should align it fine with the others (as long as the line isn't empty, so add a space character). The recently added Korean layout actually does this as well. Though it's also full of additional labels on most keys for IME input so it didn't actually stand out much to me. |
|
The ini reading functions helpfully removed trailing spaces in property values. Technically can be worked around by using one of the many other whitespace characters that exists but that behavior isn't actually what I wanted in the first place (not my code) so I just got rid of it. Thanks for noticing. As for general text alignment, I was somewhat hesitant to allow introducing too much processing per button label since this stuff was rendering all time as long the keyboard window was visible even if inactive and there's naturally going to be many buttons on a keyboard. But with the idle improvements from a while ago I don't see a reason not to do it properly. As for whether you want to wait for that or not is up to you. I have no issue fixing the layouts up later to take advantage of proper centering. Probably will have to do on some layouts anyways. |
remove trailing spaces for future proper line centering (but keep the extra line+space on num5)
|
OK, sorry for the late response. |
|
I thought I might be able to quickly sort the alignment out but didn't have time to do it yet. No reason to leave this hanging though, so I went ahead and merged it. Thanks again. This will be sorted out before this makes it into a release, no worries. |




Modified from the already existing german layout. Based the layout mostly on my IRL keyboard, with some extra functionality present on hungarian layouts i've seen online.