You are not logged in.
I have the following code (taken from http://awesome.naquadah.org/wiki/Change_keyboard_maps )
kbdcfg = {}
kbdcfg.cmd = "setxkbmap"
kbdcfg.layout = { { "us", "" , "us" }, { "ru,us", "" , "ru" } }
kbdcfg.current = 1 -- us is our default layout
kbdcfg.widget = wibox.widget.textbox()
kbdcfg.widget:set_text(" " .. kbdcfg.layout[kbdcfg.current][3] .. " ")
kbdcfg.switch = function ()
kbdcfg.current = kbdcfg.current % #(kbdcfg.layout) + 1
local t = kbdcfg.layout[kbdcfg.current]
kbdcfg.widget:set_text(" " .. t[3] .. " ")
os.execute( kbdcfg.cmd .. " " .. t[1] .. " " .. t[2] )
endeverything works fine except the awesome keybinds that use characters(meaning I can use Mod+Enter, Mod+1, etc without problem but I can't use Mod+f or Mod+Shift+c).
I went as far as identifying that changing this
awful.key({ modkey, }, "j",
function ()
awful.client.focus.byidx( 1)
if client.focus then client.focus:raise() end
end),to this
awful.key({ modkey, }, "#44",
function ()
awful.client.focus.byidx( 1)
if client.focus then client.focus:raise() end
end),fixes my problem and I can use "Mod+j" no matter what layout I have.
The thing is that changing every "latin" keybind to its keycode isn't that good or acceptable of a solution.
Unfortunately as a linux noob my knowledge is limited to understanding that I somehow have to force something to pass keycodes to awesome, but I have no idea what and that's where I need you.
The same thing is happening with Arabic and Greek so I guess it's not language specific.
//Thanks and sorry if it's somewhere solved, I did my best to search everything before posting!
Offline
Update!
So, after more searching I found that if I use the 00-keyboard.conf instead of the previous way they keybinds seem to work just fine with ru.
So I guess it has something do to with the way the setxkbmap does things? Seems strange to me since it's practically the same way if I'm not mistaken.
Though this way I can't have awesome wm display the current layout since it can't know when it changes. So I guess it's not perfect!
Any thoughts on why it works with the .conf but not if I manually do setxkbmap?
btw my 00-keyboard.conf it's the one from archwiki
Section "InputClass"
Identifier "system-keyboard"
MatchIsKeyboard "on"
Option "XkbLayout" "us,ru"
Option "XkbModel" "pc104"
Option "XkbOptions" "grp:alt_shift_toggle"
EndSectionOffline