Re: Knowing keyboard layout
- Reply: Fernando_Apesteguía : "Re: Knowing keyboard layout"
- In reply to: Fernando_Apesteguía : "Knowing keyboard layout"
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 26 Nov 2025 21:45:12 UTC
Hi,
On 11/26/25 17:37, Fernando Apesteguía wrote:
> Hi there,
>
> Is there a way to know from a script what keyboard layout is currently
> in use?
> I use setxkbmap to switch between different layouts, but I don't know
> how to actually query about the current one in use.
>
> TIA
Use -print flag:
```
$ setxkbmap -print
xkb_keymap {
xkb_keycodes { include "evdev+aliases(qwerty)" };
xkb_types { include "complete" };
xkb_compat { include "complete" };
xkb_symbols { include "pc+es+inet(evdev)" };
xkb_geometry { include "pc(pc104)" };
};
```