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

Some characters are corrupted (with possible fix) #5

Open
yalfg opened this issue Jul 5, 2019 · 0 comments
Open

Some characters are corrupted (with possible fix) #5

yalfg opened this issue Jul 5, 2019 · 0 comments

Comments

@yalfg
Copy link

yalfg commented Jul 5, 2019

The selected unicode character is inserted using xdotool, but xdotool may corrupt some characters (this is ackowledged in its man page, see BUGS section). I also tried xte, from the xautomation package. No more corruption, but then xte silently fails if the Unicode character is not part of the current keymap... In the end I found this trick that works for me (so far):

     echo -n "$selected_symbol" | xclip -i
     xdotool click 2

The first line put the selected Unicode character in the primary selection clipboard using xclip. The second line insert a middle click, pasting the selection in the current window. This way the complexity of going from a character to X keyboard events is not needed, it's just like a cut and paste.

This works on X11, not tested under Wayland (is middle click paste supported now?). So it may be X11 only, TBC.

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

1 participant