[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Keymaps in virtual consoles.



On 13/09/13 22:20, Steven Chamberlain wrote:
> kbdcontrol seems to be doing some ioctls which fail with ENOTTY even
> though I use "< /dev/console"

Actually the failing ioctl is:
> #define TIOCGETA        _IOR('t', 19, struct termios) /* get termios struct */

I've no idea why that is being used, especially on fd=0x3 which is the
keymap file it just opened.

 34119 kbdcontrol CALL  ioctl(0x3,0x402c7413 ,0x7fffffffa980)
 34119 kbdcontrol RET   ioctl -1 errno 25 Inappropriate ioctl for device


The ioctl to set keyboard layout is:
>  	#define PIO_KEYMAP _IO('k', 7)

And it returns a success status.

 34119 kbdcontrol CALL  ioctl(0,0x20006b07 ,0x7fffffffb170)
 34119 kbdcontrol RET   ioctl 0

There is a visible effect of changing layout (like german.iso changes to
qwertz layout, fr.iso to azerty, and swedish.iso

There's some visible effect (like loading german.iso enables a qwertz
layout) but mostly characters render the same (swedish.iso).

swedish.iso enables the key right of P as 0xe5, the keys right of L as
0xf6 and 0xe4 - these seem to be the correct ASCII codes but none of
those are rendered.  If you type these into xxd, the cursor doesn't even
move, but pressing ^D ^D you can see that something was typed.

If you do the same in vi, those characters don't render until you hit
enter a couple of times.  For example, enable swedish.iso, type "p[" on
a US or UK keyboard, followed by <enter> <enter> and then you see "på"
which is correct, rendered properly in the default screen font.

So I think the initial problem is with configuration of the terminal.

Regards,
-- 
Steven Chamberlain
steven@pyro.eu.org


Reply to: