ReimuNotMoe / ydotool

Generic command-line automation tool (no X!)
GNU Affero General Public License v3.0
1.52k stars 81 forks source link

Unicode characters not printing #249

Open SealProgrammer opened 4 months ago

SealProgrammer commented 4 months ago

When running something like ydotool type "ඞ", nothing is outputted. When running ydotool type "∩^ω^∩", all that is outputted is "^^".

Below is what it looks like in the terminal. The same thing happens if I switch to something else (eg, firefox or discord). image

DmitrySandalov commented 3 months ago
  1. By setting the compose key to alt_r, I can type the following Swedish word:

    % ydotool key s k alt_r shift+\' a r g alt_r o a r d
    % skärgård

    (For more on compose key: https://en.wikipedia.org/wiki/Compose_key)

  2. I have multiple keyboard layouts on my system, which I switch between using Super+Space:

    % ydotool key v o d k a \  super_l+\  d j l r f
    % vodka водка

Note: In [1], the single quote is escaped as \', and in [2], the space is escaped as \.

(Ubuntu 22.04, GNOME, Wayland)

related to https://github.com/ReimuNotMoe/ydotool/issues/214

DmitrySandalov commented 3 months ago

The information above applies to the legacy ydotool installed from the Ubuntu 22.04 repositories

  % sudo apt update && sudo apt install ydotool
  % apt-cache show ydotool | grep Version
Version: 0.1.8-3

However, the ydotool key workaround should also be valid with the latest version 1.0.4 from the releases page.

  % wget https://github.com/ReimuNotMoe/ydotool/releases/download/v1.0.4/ydotool-release-ubuntu-latest
  % wget https://github.com/ReimuNotMoe/ydotool/releases/download/v1.0.4/ydotoold-release-ubuntu-latest
  % chmod u+x ./ydotool*

  % sudo ./ydotoold-release-ubuntu-latest --socket-perm 0666

  % ./ydotool-release-ubuntu-latest key 31:1 31:0 37:1 37:0 100:1 100:0 42:1 40:1 40:0 42:0 30:1 30:0 19:1 19:0 34:1 34:0 100:1 100:0 24:1 24:0 30:1 30:0 19:1 19:0 32:1 32:0
  % skärgård
  % ./ydotool-release-ubuntu-latest key 47:1 47:0 24:1 24:0 32:1 32:0 37:1 37:0 30:1 30:0 57:1 57:0 125:1 57:1 125:0 57:0 32:1 32:0 36:1 36:0 38:1 38:0 19:1 19:0 33:1 33:0
  % vodka водка

(key codes from /usr/include/linux/input-event-codes.h)