kbingham / xhk

XLib HalfKeyboard implementation
16 stars 8 forks source link

how to use this? #13

Closed Moanrisy closed 4 years ago

kbingham commented 4 years ago
# Obtain the sources
git clone https://github.com/kbingham/xhk.git
cd xhk

# Add the build dependencies to your system (assumes debian/ubuntu)
sudo apt-get install build-essential autoconf automake pkg-config
sudo apt-get install libx11-dev libxi-dev libxtst-dev

# Build it..
./autogen.sh
./configure
make

# Run it in the terminal
src/xhk -ddd  # -ddd executes with the highest debug level to see it working :)

Open another terminal and try typing, while holding the space key down - the keyboard will be reflected. I've only tested it on UK keyboard layouts, so you might find some issues with specific layout differences.

Moanrisy commented 4 years ago

I already use that command from reading README, but it's not working when i press SPC a.

I just found out that my built in laptop keyboard working with SPC + other key. but my external keyboard not working.

Thanks for this great apps (< i type this with only left hand, this is fun.

kbingham commented 4 years ago

From what I recall, it will only operate on a single keyboard. You could modify the code to change it to select your external keyboard. But it will only work on one at a time.

Thanks for this great apps (< i type this with only left hand, this is fun.

Great! I'm glad to hear it. I wrote this when I hurt my arm, so I hope it proves useful to others.

Moanrisy commented 4 years ago

30min after I close this issue, I still try to hard code xhk.c file to use my external keyboard, not my built in keyboard. but I still can't make it working.

I use this command to list all my devices cat /proc/bus/input/devices

I unplug my external keyboard, and run the command again.

this is the devicies that missing from that command (this should be my external keyboard) I: Bus=0003 Vendor=0c45 Product=652f Version=0111 N: Name="SONiX USB DEVICE Keyboard" P: Phys=usb-0000:00:14.0-3/input1 S: Sysfs=/devices/pci0000:00/0000:00:14.0/usb1/1-3/1-3:1.1/0003:0C45:652F.0013/input/input38 U: Uniq= H: Handlers=kbd event8 B: PROP=0 B: EV=100013 B: KEY=ff80000000000000 80b0ffcd01cfffff febffbffdffffffe B: MSC=10

in xhk.c file, I try to replace "keyboard" string to "Keyboard" but still not working (my built in keyboard, have lower k "keyboard")

Moanrisy commented 4 years ago

I find another way to list my devices xinput list

Just realize there is 4 new devices when I plug my keyboard ID 15 - SONiX USB Device

I always use ID 21, but not working. After I try ID 15, it's working well :)