Everything about X, Gnome, KDE, ... and everything running on it
by Piter_ » 2012-07-24 07:30
Hi all.
How can I determine the current keyboard layout from a shell?
(I have two layouts in use)
Thanks
Joybook A52 laptop. Debian stable.
-
Piter_
-
- Posts: 206
- Joined: 2006-05-30 14:23
by panta » 2012-07-24 21:41
Try
- Code: Select all
xset -q|grep LED| awk '{ print $10 }'|cut -c5
This will give you 0 for the default layout and 1 for the other one.
-
panta
-
- Posts: 17
- Joined: 2012-03-24 22:09
- Location: Serbia
by debil » 2012-07-24 22:21
Try
- Code: Select all
$ setxkbmap -print
Check out the line with
xkb_symbols in it.
Q: Why is the Eunux kernel so bloated?
A: It was made in the image of its founder.
-

debil
-
- Posts: 1332
- Joined: 2008-05-11 08:55
- Location: Mazes of Menace, surrounded by brown puddings
-
by Piter_ » 2012-07-25 06:43
debil wrote:Try
- Code: Select all
$ setxkbmap -print
Check out the line with
xkb_symbols in it.
This will only show the available layouts
panta wrote:Try
- Code: Select all
xset -q|grep LED| awk '{ print $10 }'|cut -c5
This will give you 0 for the default layout and 1 for the other one.
This may work.
Thanks
Joybook A52 laptop. Debian stable.
-
Piter_
-
- Posts: 206
- Joined: 2006-05-30 14:23
by Piter_ » 2012-09-20 10:32
- Code: Select all
setxkbmap -print -v 8 | grep ^layout | awk 'END {print $2}'
This was my final solution
Joybook A52 laptop. Debian stable.
-
Piter_
-
- Posts: 206
- Joined: 2006-05-30 14:23
Return to Desktop & Multimedia
Who is online
Users browsing this forum: No registered users and 16 guests