Dea all,
awsome version: 3.5

I wrote the following code:

      keyboard_layout = {"us","ir"}
      current_layout =  keyboard_layout[1]

switch = function()
    naughty.notify{text=current_layout}
    if current_layout == "us" then current_layout = keyboard_layout[2]
    else current_layout =  keyboard_layout[1] end
    os.execute("setxkbmap " .. current_layout)
    naughty.notify{text="Keyboard layout has been changed to " .. current_layout}

end 

awful.key({ "Mod1"  }, "Shift_R", function()  switch() end )

When i call switch() itself, it works fine, But ALT+SHIFT doesn't work.

--Regards
Mohsen
-- To unsubscribe, send mail to [email protected].

Reply via email to