In Ubuntu C++ how can I get the name of the current keyboard?
I want to use a c++ program not the command line.
In Ubuntu C++ how can I get the name of the current keyboard?
I want to use a c++ program not the command line.
Copyright © 2021 Jogjafile Inc.
For a proper solution you can use D-bus (used for inter-process communication)
Alternatively you can try a bit of a hacky solution by installing and adding
xkblayout-stateto your path and then have a C++ wrapper:The above will print out the layout of the keyboard.