Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
:?: udev to define keyboard layout
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
dmitrio
Tux's lil' helper
Tux's lil' helper


Joined: 10 Dec 2002
Posts: 108
Location: DFW

PostPosted: Sun Jul 29, 2012 5:57 pm    Post subject: :?: udev to define keyboard layout Reply with quote

Since udev starts at sysinit level and is a part of system set,
would it be reasonable to implement udev rules to define keyboard language layout
for console (instead of /etc/init.d/consolefonts and keymaps),
and for Xorg (instead of /etc/X11/xorg.conf.d/10-keyboard.conf)?
so once rules defined - keyboard will behave the same in console and Xorg.
_________________

... Leaving ground, destination is unknown,
into the darkness and far away from home,
Will your dream come true and what will you find,
when fate is your guide ...
Back to top
View user's profile Send private message
dmitrio
Tux's lil' helper
Tux's lil' helper


Joined: 10 Dec 2002
Posts: 108
Location: DFW

PostPosted: Tue Jul 31, 2012 2:05 am    Post subject: Reply with quote

need to translate
Code:

Section "InputClass"
   Identifier "Keyboard Defaults"
   MatchIsKeyboard "yes"
   Option "XkbLayout" "us,ru(winkeys)"
   Option "XkbOptions" "terminate:ctrl_alt_bksp,grp:alt_shift_toggle,compose:rwin,grp_led:scroll"
   Option "XkbModel" "pc105"
   Option "GrabDevice" "True"
EndSection


to

Code:
/etc/udev/rules.d/111-kbd.ru.rules:
## via Xorg
ACTION=="add", KERNEL=="event?", SUBSYSTEMS=="usb",ATTRS{idVendor}=="ffff", ATTRS{idProduct}=="8081",RUN+="/usr/bin/setxkbmap -model pc104 -layout us,ru -variant ,winkeys,winkeys"
ACTION=="remove", KERNEL=="event?", SUBSYSTEMS=="usb", ATTRS{idVendor}=="ffff", ATTRS{idProduct}=="8081", RUN+="/usr/bin/setxkbmap -model 102 -layout us_intl"


but seems here should be better solution
_________________

... Leaving ground, destination is unknown,
into the darkness and far away from home,
Will your dream come true and what will you find,
when fate is your guide ...
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum