Comments (22)
It seems that a single call of setxkbmap
without arguments helps as well:
$ xdotool type --clearmodifiers --delay 0 '[ ]'
8 9
$ setxkbmap
$ xdotool type --clearmodifiers --delay 0 '[ ]'
[ ]
from xdotool.
Any progress on this?
from xdotool.
I encounter the same, or at least a strongly related, issue with with @
being typed as 2
on a dk
layout. (@
is AltGr+2
on a danish keyboard. not sure if that says anything)
I confirm that calling setxkbmap
without any parameters also fixes this for me.
Setup: Nixos, i3wm
from xdotool.
What version of xdotool?
from xdotool.
xdotool version 2.20110530.1
from xdotool.
Sweet, thank sfor the details. I'll try to reproduce with your keymap. I think this is a known (old!) issue that should be fixed in master, but I'll try to confirm for you.
from xdotool.
Yeah, I've seen some old bug reports about it. Thanks!
from xdotool.
I have a similar problem, and tried it with master. This is the output with some printf's enabled:
% xdotool type :
Finding symbol for key ':'
=> MATCH to symbol: 58
Found key for :
code: 47
sym: colon
keyseqlist_do: Sending : down (47, mods 0)
Ökeyseqlist_do: Sending : up (47, mods 0)
% setxkbmap -print
xkb_keymap {
xkb_keycodes { include "evdev+aliases(qwertz)" };
xkb_types { include "complete" };
xkb_compat { include "complete" };
xkb_symbols { include "pc+de(nodeadkeys)+us:2+inet(evdev)+level3(ralt_switch_multikey)+capslock(ctrl_modifier)" };
xkb_geometry { include "pc(pc105)" };
};
% setxkbmap de
% xdotool type :
Finding symbol for key ':'
=> MATCH to symbol: 58
Found key for :
code: 60
sym: colon
keyseqlist_do: Sending : down (60, mods 0)
:keyseqlist_do: Sending : up (60, mods 0)
% setxkbmap -print
xkb_keymap {
xkb_keycodes { include "evdev+aliases(qwertz)" };
xkb_types { include "complete" };
xkb_compat { include "complete" };
xkb_symbols { include "pc+de+inet(evdev)+level3(ralt_switch_multikey)+capslock(ctrl_modifier)" };
xkb_geometry { include "pc(pc105)" };
};
":" is where "Ö" is on the en/us layout.
When I press ":", it gets translated to the keycode that "Ö" uses.
This seems to get triggered by the difference in setxkbmap
's xkb_symbols (+us:2
).
from xdotool.
For reference: (one of) the issue(s) in the old(?) tracker: https://code.google.com/p/semicomplete/issues/detail?id=55
from xdotool.
For me, it's also failing with related issue (replace / with ` for instance).
I have the us,ca keyboard map set.
But I noticed that if I first:
setxkbmap us
Then xdotool type
start behaving properly (but I then cannot switch anymore to my alternate key map). setxkbmap us,ca
will bring me back to my default keyboard layout.
from xdotool.
Same here. My keyboard layout is set to fr in /etc/X11/xorg.conf.d/10-keyboard.conf
, but xdotool type as a US keyboard. setxkbmap fr
does fix it.
from xdotool.
Just encountered this problem. Using Ubuntu Trusty 14.04 with xdotool package version 1:3.20130111.1-3.1
, keyboardmap us,gr
. setxkbmap us
fixed it.
Glad I found this bug report, or it would have been hard to figure out. :)
from xdotool.
I also noticed that xdotool did not type characters correctly.
And after I did setxkbmap us
it did start typing correctly, but strangely enough, even after doing setxkbmap
back to my previous keyboard layout, xdotool still typed correctly.
Only after reboot it starts typing incorrectly again. but since workaround seems to be two setxkbmap
commands per session, it doesn't bother me too much.
from xdotool.
I can also reproduce this issue (using xdotool 1:3.20160805.1-4 from Debian unstable):
$ xdotool type --clearmodifiers --delay 0 '[ ]'
8 9
$ setxkbmap us
$ setxkbmap gb
$ xdotool type --clearmodifiers --delay 0 '[ ]'
[ ]
from xdotool.
@hvhaugwitz
And what is your xkbmap initially?
FWIW your example works for me using setxkbmap -layout de -variant nodeadkeys -option -option 'caps:ctrl_modifier' -option 'lv3:ralt_switch_multikey'
(xdotool version 3.20160805.1, Arch Linux).
from xdotool.
@blueyed xkbmap is set to gb
initially:
$ setxkbmap -query
rules: evdev
model: pc105
layout: gb
options: compose:menu
from xdotool.
Any progress with this issue?
from xdotool.
sigh Just hit this bug again, vaguely recalled encountering this behavior, googled xdotool input colon q
, and ended up here, finding my comment from almost 2 years ago.
When I do xdotool type :
, the window receives a Q
instead. Running setxkbmap us
fixes it. But I'm writing a script to demo some software, and I don't know if I should put that in the script, or just document that it should be used before running the script.
from xdotool.
Same strange delay on Ubuntu 20.04... almost 4 seconds to output the key if the layout is br.
thyarles@t7:~$ setxkbmap -query
rules: evdev
model: pc105
layout: br
thyarles@t7:~$ time xdotool key slash
real 0m4,160s
user 0m0,005s
sys 0m0,004s
thyarles@t7:~$ /
thyarles@t7:~$ setxkbmap us
thyarles@t7:~$ time xdotool key slash
real 0m0,040s
user 0m0,001s
sys 0m0,008s
thyarles@t7:~$ /
thyarles@t7:~$ xdotool -version
xdotool version 3.20160805.1
I think this is a Gnome/X11 issue, because I have the same behavior with the xte
of xautomation
package.
from xdotool.
Is it fixed already? I have this behavior on GNOME/X11.
from xdotool.
I've found xpaste, which appears to not have the problem (of being influenced/remapped via setxkbmap): https://github.com/ossobv/xpaste/blob/ea8b2ff9f839f9ecc345fd9d04014b99def5b112/xpaste
It is using Xlib.XK.string_to_keysym
, and Xlib.XK.string_to_keysym("y")
returns the same (121/0x79) with both setxkbmap us
and setxkbmap de
.
This might give a clue / idea about fixing this.
from xdotool.
I confirm the workaround proposed by @hvhaugwitz works great (whoa - how did you end up finding this?!).
Environment is Gnome as well (3.36.7)
Anyone tried to report it upstream?
from xdotool.
Related Issues (20)
- Impossible to chain "open thunderbird" + "resize window" HOT 2
- 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
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.