international keyboard support #1145
Comments
|
maybe a better alternative: we could have matron use a virtual console (or something? not sure how to do this myself) to get symbol events from the kernel, in addition to HID events, and scripts could use either one as appropriate. |
|
Looks like the current event code mapping was created directly from the libevdev source: I think we'd need to create alternate event name map tables for AZERTY/QWERTZ/etc. Maybe something like replacing QMK (open source keyboard software) looks like it does something similar with a keyboard map header for specific languages I found this Google/Chrome dev update/article a very friendly way of describing what happens with the Code and Key attributes Also FWIW - you can see what keyboard is set for linux system with |
console input will also introduce a few issues to handle:
in addition to:
however, as somebody using a non-US keyboard 100% of the time, i'm wondering if this improvement is actually worth the effort. this limitation you describe has typically never been a problem in other environments - when a keyboard is used for control input (games, DAWs, vim/emacs commands) or code input. text input in native languages would be nice to have, but goes slightly beyond the purpose of norns and can be easily solved on the script level for all the potential edge cases. |
|
yeah on balance it seems better to just stick with the HID codes and add new layouts there as needed. hopefully keyboard-heavy script contributors can help with this; it's as simple as you say @okyeron. |
|
this topic has come up at least a couple more times so i am trying to direct interest to this issue. one thing worth clarifying: please correct me if i'm wrong, but as i understand it the setting in i think we've established that the lower-hanging solution is not to implement a virtual console within |
|
this might be helpful: the QMK source includes lists of aliases for many languages. one way forward would be to scrape these headers and create something that looks like, say:
|
|
i like the idea to add keycode tables. "automatically detect keyboard devices" - meaning keyboards smart enough to self-identify? |
|
apologies; i'm muddying the waters with what should be a new issue (or 2.) [gonna edit this and my post above] |
|
#1251 is beyond my skill level for now. if that seeks to "provide the keycode decoding by default" then perhaps this issue is superfluous? or would it still be valuable to do the lua conversion tables? |
|
IMHO: it would still be valuable to do the lua conversion tables. i would implement new "keyboard" module as a higher-level wrapper around the existing low-level lua HID module. changes at the C level would simply facilitate choosing the appropriate script-level interface in lua for a given HID device. (e.g.: keyboard, mouse, gamepad, other.) |
|
alright, i'll try to sketch out one table and report back for feedback |
|
proposal:
open to feedback! |
|
there's already a ticket open for device-settings expansion (ie, grid rotation, midi passthru): #1129 FYI (soon) "SYSTEM" will be renamed "SETTINGS" we could just have another submenu, or reimagine the entire SETTINGS menu system if needed but generally, yes, manual selection of a list of locales which are just lua files. |
non-US keyboard layouts are not respected by keyboard-centric scripts such as Orca. this is a norns system limitation.
norns isn't using a linux system layer (like a virtual console, Xorg or Wayland) to get symbols from the kernel. it is going directly for keycodes from the HID events stream.
scripts like Orcae make use of the named enumeration of HID codes that we made here, in the norns system HID layer:
https://github.com/monome/norns/blob/master/lua/core/hid_events.lua#L8
these enumeration names assume US keyboard layout, i think. that would probably be the best place to define other layouts for different regions; scripts could continue to use the the named enums without tracking keyboard layout.
contributions would definitely help here. IIRC the tool that made these mappings from
libudevwas rather ad-hoc, but i could try and clean it up and make sure it is available in the norns repo for anyone who would like to contribute other layout data.The text was updated successfully, but these errors were encountered: