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

Unable to type less than and greater than symbols, types 3 and 7 instead #352

Closed
paulvictor opened this issue Aug 16, 2021 · 3 comments
Closed

Comments

@paulvictor
Copy link

Minimal reproducible example
When trying to run

$ echo -n '<>' | xdotool type --clearmodifiers --file -

I would expect the output to be <> but instead I get 37 as the output.

The outputs for typeing < and > are 3 and 7 respectively.

Version : 3.20210804.2
As a matter of fact, I faced this issue even with 3.20160805.1 , and I assumed that upgrading would fix it.

--
Paul

@jordansissel
Copy link
Owner

Very strange. This should work! I wonder what causes it.

Question: When you type <> normally, are these on your 3 and 7 keys (as in, maybe shift+3 types < ?)

Sometimes this is caused by a bug in xdotool (which I have not found a solution for) for certain keyboard mappings. I do all my tests, unfortunately, with a US keyboard mapping, and folks with different locality/keyboard mappings experience issues that I do not. I'd love to get this fixed.

If I test this on my workstation, it works as expected:

% echo -n "<>" | xdotool type --file -
<>

Can you attach the output of this command: setxkbmap -print ? Sometimes this output helps us figure out the next step to resolving this.

Related issues:

@paulvictor
Copy link
Author

Here is the output of setxkbmap -print

xkb_keymap {
	xkb_keycodes  { include "evdev+aliases(qwerty)"	};
	xkb_types     { include "complete"	};
	xkb_compat    { include "complete"	};
	xkb_symbols   { include "pc+us+apl(common):2+inet(evdev)+group(win_space_toggle)+terminate(ctrl_alt_bksp)"	};
	xkb_geometry  { include "pc(pc104)"	};
};

I use xdotool in a script to type out my passwords.

Interestingly when I type setxkbmap before xdotool, I am able to get the right keys typed, but it messes up my xmodmap config. I have been using this script for long, so am not sure what change I made to allow this sort of behavior.
A possible reason could be I started using xcape to allow modifiers to be key sequences in themselves(for easier working on emacs) and here is the relevant config : https://github.com/paulvictor/dotfiles/blob/master/nix/user/home.nix#L1143-L1149 mapping Shift_L to escape, Shift_R to a combination which is my window manager prefix and left and right Ctrl's to C-x and M-x.

@paulvictor
Copy link
Author

Closing this as doesn't look like its a issue with xdotool itself. I switched over to using interception-tools and things seem to be working.

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

2 participants