getxkblayout Get the current active X keyboard layout Based upon (fikovnik's answer): https://unix.stackexchange.com/questions/12072/how-do-i-get-current-keyboard-layout Comile with: sudo make uninstall && make clean && sudo make install