Date: Tue, 5 Dec 2017 01:08:44 +0100 From: Polytropon <freebsd@edvax.de> To: Jack Rosenthal <jack@rosenth.al> Cc: freebsd-questions@freebsd.org Subject: Re: Implementing multi-layer keyboard in FreeBSD syscons, and control keys repeat rate Message-ID: <20171205010844.93a1164c.freebsd@edvax.de> In-Reply-To: <20171204003039.GA16209@rosenth.al> References: <20171204003039.GA16209@rosenth.al>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, 3 Dec 2017 17:30:39 -0700, Jack Rosenthal wrote: > I'm trying to implement a multi-layer keyboard layout for the FreeBSD > console (sort of like the Neo layout, there's more things that change > the keys than just shift). If you're curious, the keyboard spec is here: > > https://github.com/jackrosenthal/threelayout > > Here's what I've got so far: > > https://github.com/jackrosenthal/threelayout/blob/master/freebsd/3l.kbd Interesting effort. However, I think traditional syscons (sc) will be abolished soon and fully replaced by NewCons (vt) due to the fact that modern X doesn't work until you switch to vt. Maybe you can also investigate how vt does things, and find a solution there? > Essentially, from what I can tell, FreeBSD only supports Shift, Ctrl, > and Alt (and combinations there of) for modifiers. So I've currently got > symbols on the 'Alt' layer, cursor controls and numpad on 'Ctrl', and > the real control keys on 'Ctrl+Shift'. >From my understanding (many years old!), this is correct, as those are the esential modifier keys on the i386-oriented hardware architecture for keyboards and their interfaces. > Besides having to use 'Ctrl+Shift' to use the real control keys, the > arrows etc. on the 'Ctrl' layer seem not to repeat when held down. That is strange. Repeat should be present on all layers where a "normal" key is part of the combination (even ESC). Additionally, the lower levels (keyboard driver and sc input handler) typically deal with "key down" and "key up" events obtained from the keyboard interface and will generate the repeat from that (for keys that can have repeat abilities). > So, a couple of questions: > > 1. Any hacks to get that key repeat working? Honestly the most > inconvenient part... No idea anymore, sorry... my days of lowlevel hardware interface hacking are over... ;-) > 2. Any way to make the Ctrl key send Ctrl+Shift? I was thinking that I > could make a function key for that, but cannot find any way to do > that from the manual (kbdcontrol). This is something to be implemented in the keyboard driver directly, i. e., atkbd or ukbd - and re-check with the lower-level sc (or vt?) interface to those drivers, usually there are ioctl()s doing it. -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ...
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20171205010844.93a1164c.freebsd>