AHK_X11 icon indicating copy to clipboard operation
AHK_X11 copied to clipboard

Cannot insert Unicode

Open matzl opened this issue 1 year ago • 1 comments

First of all, coming from Windows as a heavy AutoHotKey user, I love your project! Really appreciate it. I made some of the most important parts of my old script work in Ubuntu using AHK_X11 as well, but I struggle to insert Unicode, as I did in my old Windows AUtoHotKey script:

^+-::Send {U+2012} ; insert figure dash "‒" when pressing ctrl + shift + -
^+.::Send {U+2026} ; insert ellipsis "…" when pressing ctrl + shift + .

When pressing the shortcuts, nothing happens. I also tried (as in https://phil294.github.io/AHK_X11/#Send.htm__asc ):

^+_::Send {ASC 2012}
^+.::Send {ASC 2026}

But I get the erros message "key name 'ASC' not found"

ChatGPT proposed to do something like

^+-::
    Clipboard := "‒"  ; Set clipboard to the figure dash (U+2012)
    Send, ^v          ; Paste it
return

or

^+-::
    Run, xdotool type --delay 0 "‒"
return

But it also doesn't work. Any suggestions on how to make it work or a path to support this feature? Thank you!

matzl avatar Mar 17 '25 20:03 matzl

Hi and thanks for the kind words. This is like #34. I don't know, but SendRaw is capable of typing at least for me. {U+} notation isn't supported, nor is := "..." syntax (see Readme). ChatGPT probably means windows ahk, not ahk_x11, so you can probably ignore its output.

phil294 avatar Mar 20 '25 18:03 phil294