Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Full documentation #212

Open
imrek opened this issue May 20, 2018 · 2 comments
Open

Full documentation #212

imrek opened this issue May 20, 2018 · 2 comments

Comments

@imrek
Copy link

imrek commented May 20, 2018

Where do I find the full documentation? E.g. key names. I can't figure out how to get xdotool understand key combinations with 'Alt'.
The page README.md refers to as 'Documentation' has nothing on this.

Also, if I try to send multiple key combinations, they may execute out of order.

@kfreiman
Copy link

kfreiman commented Jun 17, 2018

I guess, the most complete documentation in

man xdotool

@jordansissel
Copy link
Owner

man xdotool is the best place to find the docs. I can put these online in a useful place if that would help?

It's available on github as: https://github.com/jordansissel/xdotool/blob/master/xdotool.pod

The key name documentation could be improved. What we have today is:

key [options] keystroke [keystroke ...]
...
Generally, any valid X Keysym string will work. Multiple keys are separated by '+'. Aliases exist for "alt", "ctrl", "shift", "super", and "meta" which all map to Foo_L, such as Alt_L and Control_L, etc.

A big gap here is what a "valid X Keysym string" is. Any non-X11 programmer probably wont' know what this is, so we could improve that.

For now, I can help by saying two things (neither of which are expected to be known or obvious to users, and I see ways to improve the docs!):

First, that they are listed in keysymdef.h that comes with X11 development libraries. For example, keysymdef.h. Any #define in this file starting with XK_ is a keysym and is the name of the key, so where you might see #define XK_ballotcross ... you can remove the XK_ part and use ballotcross as the key: xdotool key ballotcross.

Second, an alternative if you are looking for a key you are typing, you can run the xev program. When xev is the focused window, any events (typing, mouse, etc) will be printed as a kind of debug output to the console. From xev, you can press a key and learn it's keysym name.

Hope this helps.

Also, if I try to send multiple key combinations, they may execute out of order.

How are you sending them? They are expecpted to execute in the order you supply. The order is each command argument is executed in the same order they occur on the command line. If you find differently, this is likely a bug, and maybe we can figure out what is causing it, and do some digging to find a solution?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants