XInput device properties ; keymaps service & console switch

Sebastian Glita glseba at yahoo.com
Sat Oct 23 02:22:50 PDT 2010


Hi,

in /etc/rc.conf there is a shortcut way to limit rc_tty_number to 6, if xdm 
console were 7, e.g. (6<7)/

The init.d script "keymaps" uses `kbd_mode' program from 
http://freshmeat.net/projects/kbd/.
Its source files `getfd.c' and `kbd_mode.c' use 2 read ioctl's:

ioctl(fd, KDGKBTYPE, &arg)
ioctl(fd, KDGKBMODE, &mode)

and 1 write ioctl:

ioctl(fd, KDSKBMODE, mode)

the macros come from <linux/kd.h>

#define KDGKBTYPE    0x4B33    /* get keyboard type */

#define KDGKBMODE    0x4B44    /* gets current keyboard mode */
#define KDSKBMODE    0x4B45    /* sets current keyboard mode */

also, some other console services ("numlock") use ${rc_tty_number}.

'fd' is passed to `kbd_mode' from "keymaps" init.d script, in a loop from 1 to 
${rc_tty_number:-12}, read from /etc/rc.conf; when 'fd' comes from /dev/tty7, 
the ioctl's above appear to conflict with some Xorg code; stopping before 
/dev/tty7 does the trick, but at a user is demanded some tweaking of 
/etc/rc.conf.

Regard s.


> 2.
> 
> When I restart keymaps service like this:
> 
>     user at localhost ~ $ #eselect rc restart keymaps
>     user at localhost ~ $ /etc/init.d/keymaps restart
> 
> then whenever I press:
> 
>   - F1..12 keys or
>   - Alt+F1..12 or
>   - the windows key,
> 
> whether Control (CTRL) key is pressed or released, it doesn't matter, I get a 
> console switch each time.

what does xev say about key presses? is the ctrl key stuck?

Cheers,
  Peter



      



More information about the xorg mailing list