I need to get scan codes of keyboard buttons (or any other codes) in layout-independent way. More specific, let's say I have QEditText and catching keystrokes from it. Now I'm starting to press a single button, and when the layout is English it has keycode=X, then I'm switching layout to Russian (German, French, whatever) and keycode becomes Y - but the physical button is the same. So I need to know code of that physical button, how to do this?
How to convert X11 KeyCode or KeySym to scan code
1.5k Views Asked by AudioBubble At
1
There are 1 best solutions below
Related Questions in C++
- C++ using std::vector across boundaries
- Linked list without struct
- Connecting Signal QML to C++ (Qt5)
- how to get the reference of struct soap inherited in C++ Proxy/Service class
- Why we can't assign value to pointer
- Conversion of objects in c++
- shared_ptr: "is not a type" error
- C++ template using pointer and non pointer arguments in a QVector
- C++ SFML 2.2 vectors
- Lifetime of temporary objects
- I want to be able to use 4 different variables in a select statement in c ++
- segmentation fault: 11, extracting data in vector
- How to catch delay-import dll errors (missing dll or symbol) in MinGW(-w64)?
- How can I print all the values in this linked list inside a hash table?
- Configured TTL for A record(s) backing CNAME records
Related Questions in LINUX
- How do I recursively find and replace only in files named index.php on Linux webserver?
- passing text with \n as one argument in shell
- kernel module does not print packet info
- How to send ESC/POS commands to thermal printer in Linux
- (x64 Nasm) Writeline function on Linux
- How do I set the Hive user to something different than the Spark user from within a Spark program?
- Default priority of thread with SCHED_FIFO
- Calling a python function with options from shell script
- How to split a directory into parts without compressing or archiving?
- Cross compile simple standard C program on Linux for Mac
- How to offload NAPI poll function to workqueue
- python netifaces - How to get currently used network interface
- Unexpected output from function
- mingw-64 conflicting declarations when cross-compiling
- Different behavior of async with Visual Studio 2013(Windows8.1) and GCC 4.9(Ubuntu14.10)
Related Questions in X11
- How to edit the xorg.conf
- What exactly is X11 Channel
- Integrating XCB and libX11 event loops - hanging on select/poll inside Xt
- When I use hsqldb I have problems with GUI (JavaFx)
- X11 Xterm Keyboard layout is off by one or worse.
- libX11: XPutImage first call
- Wine InnoSetup CentOs
- How can I get screenshot from all displays with X11?
- How does Mplayer interface with external windows?
- Create window without title bar
- `XSetWMNormalHints` and `XSetWMSizeHints`
- X11: how to run an application after login?
- Xscreensaver renders nothing
- X11/Xorg to X11/Xorg developer OSX
- Why does XGrabKey return BadRequest?
Related Questions in KEYCODE
- What is the char represented by keycode (15) c#?
- Is Shift the only key that can change the value of keyCode?
- On click, press enter to textbox
- How to print key character code in OSX?
- Backslash key code is recognized as german umlaut
- Convert char into KeyEvent on Android
- Convert character in PHP to javascript event keycode
- c# ascii to keycode?
- c# textBox1.Text converting to KeyCode and send it to a chat program with SendMessage
- Closing modal with e.keypress
- List of hex keyboard scan codes and USB HID keyboard documentation
- Problems with barcode reading using PreFilterMessage
- How to combine key codes to work together in javascript
- Delphi Key Code 17 in FormKeyDown
- How can I format my character code to a string name
Related Questions in SCANCODES
- How to convert VK scan codes to appropriate character for language selected
- Dvorak vs QWERTY scancodes
- How to convert X11 KeyCode or KeySym to scan code
- Linux asm - int 16h analogue to read raw keyboard scancodes
- Scancode when I press a key is different. Is Microsoft specification wrong?
- Why do winapi functions need scan code although there is a keyboard driver?
- Get scan code from WM_CHAR message
- osx mavericks keyboard scancodes map to the same characters independent of language map
- Windows scancodes for F11 and F12 are different. Why?
- How to translate Ordinary scancodes to ascii charcters
- C++ (Windows): Convert a virtual key code string representation ("VK_F6") to hexadecimal (0x75)
- How to generate a keyboard interrupt in assembly 8086
- Are linux/input.h keycodes layout independent?
- autohotkey scancode in combination
- What is the difference between an SDL physical key code and an SDL virtual key code?
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
I am not sure if you will be able to do this only from code itself by some qt/x11 methods, but there is a tool that helps in similar situations: xbindkeys. You can read more here: https://unix.stackexchange.com/questions/91355/shortcut-keys-that-are-independent-to-keyboard-layout
If you can't use xbindkeys, you can still check its code and see how the author achieved this.