1

How to catch keyboard layout change under Linux

view story
linux-howto

http://stackoverflow.com – Here is my previous question. I am trying to solve this problem with platform dependent code below. Under Windows all work fine. But under Linux I can't get language name, only country. Also I don't know what message (under Linux) is associated with keyboard layout change event. I used this solution for Linux part. bool MainWindow::nativeEvent(const QByteArray& eventType, void* message, long* result) { #ifdef Q_OS_WIN MSG* msg = reinterpret_cast<MSG*>(message); if(msg && msg->message == WM_INPUTLANGCHANGE) { HKL hkl_id = GetKeyboardLayout(0); (HowTos)