Comments (3)
Has someone come up with the right and universal way to input numpad digits via xdotool?
For example, I want to input Numpad-5. I do xdotool key KP_5
but I get the following in xev (shift is activated too and I don't have "5" input in my app):
KeyPress event, serial 39, synthetic NO, window 0x7a00001,
root 0x258, subw 0x0, time 5567089, (1421,438), root:(1461,491),
state 0x10, keycode 50 (keysym 0xffe1, Shift_L), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False
KeyPress event, serial 40, synthetic NO, window 0x7a00001,
root 0x258, subw 0x0, time 5567119, (1421,438), root:(1461,491),
state 0x11, keycode 84 (keysym 0xff9d, KP_Begin), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False
KeyRelease event, serial 40, synthetic NO, window 0x7a00001,
root 0x258, subw 0x0, time 5567126, (1421,438), root:(1461,491),
state 0x11, keycode 50 (keysym 0xffe1, Shift_L), same_screen YES,
XLookupString gives 0 bytes:
XFilterEvent returns: False
KeyRelease event, serial 40, synthetic NO, window 0x7a00001,
root 0x258, subw 0x0, time 5567126, (1421,438), root:(1461,491),
state 0x10, keycode 84 (keysym 0xffb5, KP_5), same_screen YES,
XLookupString gives 1 bytes: (35) "5"
XFilterEvent returns: False
The current way I use is xdotool key 84
– it gives me correct results but I'm not sure that 84 is KP_5 for every Linux machine:
KeyPress event, serial 38, synthetic NO, window 0x7400001,
root 0x258, subw 0x0, time 6201400, (984,-4), root:(2795,992),
state 0x10, keycode 84 (keysym 0xffb5, KP_5), same_screen YES,
XLookupString gives 1 bytes: (35) "5"
XmbLookupString gives 1 bytes: (35) "5"
XFilterEvent returns: False
KeyRelease event, serial 39, synthetic NO, window 0x7400001,
root 0x258, subw 0x0, time 6201423, (984,-4), root:(2795,992),
state 0x10, keycode 84 (keysym 0xffb5, KP_5), same_screen YES,
XLookupString gives 1 bytes: (35) "5"
XFilterEvent returns: False
key KP_Begin
also works but again I'm not sure it will be available on other machines. Is there maybe a way to switch machine layout to something universal prior running xdotool, maybe it will help?
from xdotool.
I think this problem was previously noticed at:
https://groups.google.com/forum/#!msg/xdotool-users/NOroPeUUuqs/b-2sWNdq2P0J
from xdotool.
Still a problem.
Workaround as per the linked forum - Use the alternative names, not the numbered ones.
You can get them from xmodmap -pke
Tested on Arch xdotool 3.20160805.1-3
xev output:
from xdotool.
Related Issues (20)
- xdotool mousemove does not work on fc38
- Random mistake with type command
- Trouble getting xdo_click_window() function to work
- xdotool will not launch on Mint 21.2 Cinnamon
- xdotool key Alt+Tab on Ubuntu, not switch app window
- xdotool sets _NET_WM_NAME as a STRING when it needs to be set as UTF8_STRING
- Extremely strange bug - see attached video. HOT 2
- Add various random timing capabilities
- [Feature] Ability to query and change desktop names
- [Feature] Search for windows that are unmapped or visible on all desktops HOT 1
- Latest xdotool version in Ubuntu 22 repos silently fails on Wayland :sob: apt can't upgrade it, and manual doesn't help HOT 2
- Segfault when running over an ssh connection
- set_desktop --relative does not work for -1 HOT 2
- xdotool cannot send key combinations to Qt-based applications HOT 5
- XGetInputFocus returned the focused window of 1. This is likely a bug in the X server. HOT 1
- Search not seeing Steam Input On-Screen Keyboard HOT 7
- The character ":" is typed as "Q" in VM window HOT 1
- Xdotool works in Firefox but not Brave HOT 1
- behave_screen_edge only works with certain open windows
- "mousemove" to the same position jams read operation HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from xdotool.