libuiohook icon indicating copy to clipboard operation
libuiohook copied to clipboard

Can't type special characters with right alt

Open caderek opened this issue 3 years ago • 3 comments

Hi, great library!

I'm using it via Node.js bindings and the author of the bindings thinks that my issue is a problem with this library.

The problem that I have, is that when I send the key with right alt pressed, it does not type special character but executes a shortcut like if the left alt was pressed instead. For example, RightAlt+5 should type the symbol, but instead it does whatever is assigned to LeftAlt+5 (for example, goes to the fifth tab in a browser).

My OS: Linux (popOS! / Ubuntu)

Original issue: https://github.com/SnosMe/uiohook-napi/issues/22

caderek avatar Sep 16 '22 17:09 caderek

This is working for me in 1.2.2.

Compile that 1.2.2 tag:

cmake -B ./build \
    -G "Unix Makefiles" \
    -D CMAKE_INSTALL_PREFIX=./dist/linux/arm64 \
    -D CMAKE_VERBOSE_MAKEFILE=true \
    -D BUILD_SHARED_LIBS=ON \
    -D BUILD_DEMO=ON

cmake --build ./build \
    --parallel 2 \
    --config RelWithDebInfo \
    --clean-first

cmake --install ./build --config RelWithDebInfo

cd build/
./demo_hook

Left Alt (56 / 0x38):

id=4,when=208851260,mask=0x2008,keycode=56,rawcode=0xFFE9
id=3,when=208851260,mask=0x2008,keychar=
id=5,when=208851316,mask=0x2000,keycode=56,rawcode=0xFFE9

Right Alt (3640 / 0xE38):

id=4,when=208857124,mask=0x2080,keycode=3640,rawcode=0xFFEA
id=3,when=208857124,mask=0x2080,keychar=
id=5,when=208857275,mask=0x2000,keycode=3640,rawcode=0xFFEA

kwhat avatar Sep 17 '22 16:09 kwhat

To clarify, this is about hook_post_event

SnosMe avatar Sep 17 '22 18:09 SnosMe

🤣ok, yah that would help. I'll take a look at the post code. I just rewrote that not to long ago but there maybe a bug.

On Sat, Sep 17, 2022, 11:52 AM Alexander Drozdov @.***> wrote:

To clarify, this is about hook_post_event

— Reply to this email directly, view it on GitHub https://github.com/kwhat/libuiohook/issues/154#issuecomment-1250123407, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAFFCRAE3QUXNHFFF5QTZKLV6YHP7ANCNFSM6AAAAAAQOQKXUM . You are receiving this because you commented.Message ID: @.***>

kwhat avatar Sep 17 '22 19:09 kwhat