#qi-hardware IRC log for Monday, 2015-04-13

eintopfwpwrak: what do you plan to do? bring atusb mainline?07:52
whitequarkwpwrak: keyboard layouts07:55
whitequarkas in, there can be more than one keyboard layout07:55
wpwrakeintopf: no, i'm just fixing a few things i found in anelok. anelok uses the core stack from ben-wpan10:43
wpwrakwhitequark: yes, like pressing "Z" on a german keyboard yielding "Y" if the system uses the US keymap. USB HID is basically problem-compatible with PS/210:44
whitequarkwpwrak: and what exactly do you suggest? the chip knowing what's on keycaps?10:46
whitequarkthat would mean that if something doesn't come with RU layout, there's no way to enable it, as well as added communication (complexity) between OS and kbd10:47
eintopfI use in germany the us keylayout, always funny if somebody try and try again to input his/her passwort with my account settings.10:56
eintopfit's easier to write brackets10:56
wpwrakwhitequark: there are many possibilities how this could be done right, e.g.,11:03
wpwrak- the keyboard could send the codes that correspond to what's on the keycaps, but your can override things in the host if you want,11:04
wpwrak- the keyboard could have a "raw" and a "translated" mode, so you can choose between both models,11:04
wpwrak- the keyboard could have a USB descriptor with the translation table and the host could then just use this as a basis.11:05
wpwrakand if the keyboard just sent the correct code, there would be no communication overhead. in any case, HID is rather complex, so adding a new setting or such wouldn't really make a difference in the overall copmlexity11:06
whitequarkthe keyboard still has to be informed about the layout...11:06
wpwrakthat's a factory setting11:07
whitequarkabout the /selected/ layout11:07
wpwrakwould solve 99.9% of all uses. for the 0.1%, people could just get some utility to "hack" the keyboard11:07
whitequarkfor, you know, everyone except 200m or so people in the anglosphere11:07
whitequarkno, *your* use case is the minority one11:07
wpwrakno, the keyboard would just send the code that corresponds to what's on the keycap11:08
whitequarkthere are more than one symbol on the keycap11:08
whitequarksometimes more than two.11:08
wpwrakwell, mix in the modifiers11:08
wpwrakor have that information in the translation table11:09
wpwrakin the decision of what symbol to send11:09
whitequarkit's not a modifier11:09
whitequarkit's a layout selected in the DE11:09
wpwrakDE ?11:09
whitequarkdesktop environment11:09
wpwrakso you have keyboard with multiple alternative layouts, all printed on the keycaps ?11:10
whitequarkmost people (on the planet) do11:11
whitequarkyou switch between them by using alt+shift or such11:11
wpwrakwell, it's still a modifier then11:11
whitequarkit's not a fixed modifier11:11
wpwrakRU-lock or whatever :)11:11
wpwrakand i guess you have some override that switches to the respective other layout for a single keypress ? e.g., if your mode is US, Y sends Y, and AltGr-Y sends H.11:13
wpwrakbtw, the QWEYTY us funny. nicely illustrates the confusion :)11:14
whitequarkno, there is no override11:14
wpwrakthat must suck sometimes11:14
whitequarknot a problem in practice11:14
whitequarkthe weirdly changing layout on numeric keys is, but the fix is not to add one-off modeswitch11:15
wpwrakanyway, yet another option would be for the keyboard just to announce a layout code. in case a table is just too much work. so you'd still send key codes but at least the host would know what's printed in the keycaps and could select a suitable layout.11:15
whitequarkyeah, that would make sense11:16
whitequarkand would be completely trivial to add11:16
wpwrakthough a table would be more flexible. and the usb folks *love* tables. the more, the merrier :)11:16
wpwrakthey actually almost added such a code: there is a "country" field in the HID descriptor, but a) it only knows about a few countries, most of which having only one layout, thus not working for anything not totally mainstream, and b) setting it to something meaningful is kinda optional11:21
whitequarkthere is no mapping between countries and layouts11:21
wpwrake.g., my HHKB (US layout) happily identifies itself as "Japan (Katakana)"11:22
wpwrakwell, there kinda used to. at least if you consider the original IBM keyboards as the reference :)11:22
wpwrakand they have codes for variations inside the same country, e.g., switzerland has a french and a german version11:24
wpwrakpage 13 (23) of http://www.usb.org/developers/hidpage/HID1_11.pdf11:24
whitequarkthere is no mapping between (physical location) and (what is painted on keys)11:26
whitequarkis it more clear now?11:26
wpwrakyou mean based on country ? i would expect that even in russia there is. maybe a few major variants, but i guess when you visit a friend you won't be faced with a completely different layout11:29
whitequarkyou just introduced another completely unnecessary and flawed step11:30
whitequarkinstead of manufacturing a keyboard with language X on keycaps, you suggest manufacturing a keyboard for some chinese dude's idea of what's used in country X11:30
wpwrakof course, with laptops and other more creative layouts, the whole concept of "standard" layouts collapses. but then you usually don't get a driver with the perfect position-to-symbol (or function) mapping, but you get a controller that makes it look like a common layout. hence my idea for a table: stop the madness :)11:31
wpwrakthere's no straight mapping for "language" either :)11:32
wpwrake.g., swiss-german != german, swiss-french != french, canadian-french != swiss-* and != french11:32
wpwrakbut then spanish is probably pretty close to the "country" of "latin america"11:33
wpwrakand it's anyone's guess what language they speak in "International (ISO)" ;-)11:34
wpwrakso if you wanted a single code, you'd probably need a registry. or spread it out by making this per vendor. but that would have its own set of problems.11:37
whitequarkyes, there should be a registry11:37
whitequarkthen you could create the xorg mappings using sed, instead of dark magic and collecting lost souls or whatever11:38
wpwrakof course, USB-IF would probably want to see some kilodollars for an entry ...11:41
whitequarkmaking a keyboard requires injection molding11:41
whitequarka few k$ is nothing compared to it11:41
wpwrakyes, for homo economicus, there would be no question. but ... :)11:43
whitequarkand if you don't make your keyboards in bulk, you probably shouldn't invent your own layout11:45
whitequarkthere are too many already11:45
--- Tue Apr 14 201500:00

Generated by irclog2html.py 2.9.2 by Marius Gedminas - find it at mg.pov.lt!