Planet Computers's Gemini Developers Forum
Debian Linux keyboard configuration - Printable Version

+- Planet Computers's Gemini Developers Forum (https://developer.planetcom.co.uk)
+-- Forum: Gemini (https://developer.planetcom.co.uk/forumdisplay.php?fid=1)
+--- Forum: Linux on Gemini (https://developer.planetcom.co.uk/forumdisplay.php?fid=4)
+--- Thread: Debian Linux keyboard configuration (/showthread.php?tid=23)



Debian Linux keyboard configuration - nafmo - 03-20-2018

Hi!

Does anyone know how to get the keyboard layout configured under the Debian boot? I installed it yesterday, and I can only get the very basic keyboard functions to work, i.e just the base character and shifted character, none of the Fn+key combination work, which makes it hard to access the symbols necessary to drive the Linux command line.

The included Desktop Environment seems to be on the slow side, I am planning on replacing it with LXDE, which is designed to run on lower-end machines (I even run it on my high-end desktop because of its lack of unnecessary distracting screen candy), probably with lxlauncher to use as a touch-screen launcher, but without a working keyboard I am not getting anywhere.

Is there any work ongoing to make the various Gemini keyboard layouts available under Linux (I have a Swedish physical keyboard)? If not, where do I contribute? (I used to be a Debian developer, but dropped out due to lack of time and bureaucratic issues).


RE: Debian Linux keyboard configuration - Michael - 03-21-2018

https://wiki.archlinux.org/index.php/Keyboard_configuration_in_Xorg

Or if you prefer to look at Debian documentation then https://wiki.debian.org/Keyboard#Keyboard_configuration. But you'll learn more from the first link Wink

I find the app 'Xev' is handy when setting shortcuts. https://www.x.org/archive/X11R7.7/doc/man/man1/xev.1.xhtml
Run it, bash a key, read the keycode. If it doesn't register a key press for certain keys then report back.


RE: Debian Linux keyboard configuration - dguidi - 03-22-2018

This is work in progress - you can find an initial GB layout here.


RE: Debian Linux keyboard configuration - adamboardman - 03-23-2018

nafmo - would be cool if you would like to contribute the Swedish layout, if you check the file that dguidi linked to you'll see it now contains gb and us, you just need to define the different keys for your layout, or the full set if the layout is so different as to not make any sense to base it on the initial UK(gb) layout. I was told you needed a new kernel but never tried it without that, please update this page with any useful tips: DebianTP


RE: Debian Linux keyboard configuration - nafmo - 03-24-2018

(03-23-2018, 02:05 PM)adamboardman Wrote: nafmo - would be cool if you would like to contribute the Swedish layout, if you check the file that dguidi linked to you'll see it now contains gb and us, you just need to define the different keys for your layout, or the full set if the layout is so different as to not make any sense to base it on the initial UK(gb) layout. I was told you needed a new kernel but never tried it without that, please update this page with any useful tips: DebianTP

Yeah, I would like to get that up and running, too :-) I have the Debian TP up and running, but haven't figured out how to get networking to work on it yet, so it is a bit difficult to get files to/from it.

Currently running on a USB keyboard connected through the USB hub, looks kind of funny with a keyboard larger than the device, though.


RE: Debian Linux keyboard configuration - nafmo - 03-24-2018

(03-22-2018, 12:40 PM)dguidi Wrote: This is work in progress - you can find an initial GB layout here.

OK, I tried creating a layout based on that, but I can't seem to get it working properly. The Fn key does not seem to do anything at all when I try to press it, so I can't get to those characters. Also I cannot get the Ö key to output anything at all, here is a photo (haven't figured out how to make a screenshot on the device yet) showing the keyboard layout configuration and xev output from pressing the Ö key (to the right of the L key). The xev output seems to indicate that it hasn't picked up the "Planet Computers Gemini" alternate layout, as it shows keysum adiaeresis (Ä), which is what the key is on a regular Swedish keyboard. Still, it is strange that I get no character produced in the terminal...

[Image: 40101920955_5d986aea6b_z.jpg]

Here is the patch for the Swedish keyboard layout. I rebuilt the xkb-data package with this patch and installed on the Gemini (had to copy the file across using a USB drive, as I can't get Linux to find any NIC on the Gemini, neither the wifi nor the wired in the USB hub).


RE: Debian Linux keyboard configuration - nafmo - 03-25-2018

(03-24-2018, 11:31 PM)nafmo Wrote: Also I cannot get the Ö key to output anything at all, here is a photo (haven't figured out how to make a screenshot on the device yet) showing the keyboard layout configuration and xev output from pressing the Ö key (to the right of the L key). The xev output seems to indicate that it hasn't picked up the "Planet Computers Gemini" alternate layout, as it shows keysum adiaeresis (Ä), which is what the key is on a regular Swedish keyboard. Still, it is strange that I get no character produced in the terminal...

The non-printing issue seems to be a locale issue, the terminal expecting UTF-8, but the keyboard producing ISO-8859-1, or something to that effect. I did install the missing locales package, generated the sv-SE locale and restarted, but it still doesn't print. The keyboard tester in the layout selector app does indicate keypresses, but it produces the Ä of a full-sized keyboard, not the Ö of the modified Gemini layout tried to select.


RE: Debian Linux keyboard configuration - adamboardman - 03-25-2018

If none of the Fn+* combinations are working then check your kernel version:
uname -a
Linux [hostname] 3.18.41+ #59 SMP PREEMPT Wed Mar 7 19:41:32 MSK 2018 aarch64 GNU/Linux

If its not #59 as above then the Fn key is still mapped to a number too high for X11 to understand so xkb refuses to notice it. See DebianTP for some general tips and also how to update your kernel with a quick 'sudo dd'.

There is no actual compiling or other makefile magic going on with the planet_vndr/gemini file so you can just copy/edit that file on device (/usr/share/X11/xkb/symbols/planet_vndr/gemini). Though networking is very useful for getting to contribute your changes back.

I've not tried different ways of connecting the WiFi, the way that worked for me was to use the LXQT menu -> Internet -> Connman UI Setup
Then under Status -> Technologies:Wifi:Powered -> On
Then under Wireless -> Select [my network] -> Connect -> Enter [password] -> Tab*5 (to a button you cannot see) -> Enter

Then to get it to come back each boot Preferences enable 'Retain State' + 'Enable Autostart'.

Another useful command for debugging keyboards is 'setxkbmap -v se' this will trigger the setting of the map from udev hints, unfortunately this fails if you've attached a usb keyboard any time after the last reboot. The -v output should look something like this when its working:
keycodes:   evdev+aliases(qwerty)
types:      complete
compat:     complete
symbols:    pc+planet_vndr/gemini(se)+inet(evdev)+planet_vndr/gemini(escape)
geometry:   pc(pc104)


RE: Debian Linux keyboard configuration - nafmo - 03-25-2018

(03-25-2018, 11:44 AM)adamboardman Wrote: Another useful command for debugging keyboards is 'setxkbmap -v se' this will trigger the setting of the map from udev hints, unfortunately this fails if you've attached a usb keyboard any time after the last reboot. The -v output should look something like this when its working:
keycodes:   evdev+aliases(qwerty)
types:      complete
compat:     complete
symbols:    pc+planet_vndr/gemini(se)+inet(evdev)+planet_vndr/gemini(escape)
geometry:   pc(pc104)

Thanks!

Wifi: Works (I'm not used to KDE, using LXDE everywhere else, and only on desktop without Wifi).
Keyboard: Works, but only after running "setxkbmap -v se" (which is slightly difficult with the default keyboard layout not having a "-" character).

The missing characters in the terminal seems indeed to be a locale issue, for some reason it sets it to sv_SE.US-ASCII, which is very wrong...

Now, this is getting along nicely!


RE: Debian Linux keyboard configuration - adamboardman - 03-28-2018

I've just added an initial Russian+Japanese layouts, its using xkb groups so the keyboard stays in either (Russian|Japanese) or English layout, you just press both shift keys simultaneously to switch, this seemed easier than finding the alt+shift keys which is another common way of doing it. Any strong opinions can probably change this by swapping group(shifts_toggle) to group(alt_shift_toggle). I don't speak Russian or Japanese so corrections welcome, also preferences for any of the unprinted/unallocated Fn+Shift+ characters too. Could also do with some help on Fn+Q, Fn+Alt, Fn+, for the Japanese layout.