jekhor / yogabook-linux

Yoga Book Linux porting efforts, umbrella repository for link all pieces together
74 stars 8 forks source link

Halo Keyboard different layout #23

Closed Txori closed 2 years ago

Txori commented 3 years ago

Hi. My ENTER key was acting weird, so I discovered that I don't have the same keyboard layout. It's a QWERTY keyboard, but slightly different:

yogabook_kb_layout

I wrote a script to convert etc/touch_keyboard/layout.csv to a SVG file in order to see what's going on: https://www.w3schools.com/code/tryit.asp?filename=GRC9DDYNX1SH

Now I'm going to modify it. Do I have to modify other files in your ubuntu-yb/rootfs folder in order to make it work? I'll send the final file when it will be done. Do you happen to know the technical version number or country code of that keyboard layout?

Thanks

jekhor commented 3 years ago

Hi. The latest touchkeyboard support package has support for different layouts already. I will explain how to use them late here if I will have enough time.

ср, 9 чэр 2021, 14.25 карыстальнік Txori @.***> напісаў:

Hi. My ENTER key was acting weird, so I discovered that I don't have the same keyboard layout. It's a QWERTY keyboard, but slightly different:

[image: yogabook_kb_layout] https://user-images.githubusercontent.com/3765943/121345636-662b0380-c925-11eb-88b4-88d0b59f14dd.png

So I wrote a script to convert etc/touch_keyboard/layout.csv to a SVG file in order to see what's going on: https://www.w3schools.com/code/tryit.asp?filename=GRC9DDYNX1SH

Now I'm going to modify it. Do I have other files to modify in your ubuntu-yb/rootfs folder in order to make it work? I'll send the final file when it will be done. Do you happen to know the technical version number or country code of that keyboard layout?

Thanks

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/jekhor/yogabook-linux/issues/23, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAA4VWYHJ6VXYAARNKVTHE3TR5FQ5ANCNFSM46L2YJ2Q .

Txori commented 3 years ago

Oh, all right. Thank you :)

Txori commented 3 years ago

By the way, I was wondering, how halo keyboard works on Linux... Is it a simple driver, or does it need special things in the kernel? I'm currently running Xubuntu on my Yoga Book. How hard would it be to use that keyboard driver on some other OS, like ChromeOS or other Linux distro?

TiNredmc commented 3 years ago

@Txori the way that it works is similar to windows, exception that Linux sees that touch keyboard as a touchscreen (technically it is) but @jekhor wrote the hwdb file to config libinput to ignore the touch input not to use it as touchscreen. He also wrote special program to read "event" from input ("event" in this case is the x,y coordinate when finger(s) touch the surface) and emulate itself as a virtual keyboard and mouse. That program is called Keyboard handler.

On the other hand on Windows, The driver is specially written. The keyboard handler is built-into the Goodix touchscreen driver, that have access to Intel's PWM api, thus you can change keyboard brightness. But the haptic feedback is different part, they have their own program to handle the haptic feedback when button is pressed by user.

About using touch keyboard on chromeOS is possible. But there're 3 things to concern.

  1. Since ChromeOS is Linux, It can run normal linux binary (program). But his keyboard handler require the hardware access which can be different between chromeOS and other Debian-Based linux.
  2. The way to make the keyboard works is also rely on "udev", afaik is the somthings likes hardware management software, It helps loading driver or run automated script when event happen (hardware detected, removed, etc). But on ChromeOS, I don't think they use udev.
  3. Driver on ChromeOS kernel isn't exactly from official (Mainline) Linux kernel, so to get the Yoga up and runnung. All sort of device drivers including Goodix touch keyboard driver need to be ported over to ChromeOS.

And by the way, ChromeOS is (technically) only available on commercial device. But you rather use ChromiumOS that actually open source.

jekhor commented 3 years ago

By the way, I was wondering, how halo keyboard works on Linux... Is it a simple driver, or does it need special things in the kernel? I'm currently running Xubuntu on my Yoga Book. How hard would it be to use that keyboard driver on some other OS, like ChromeOS or other Linux distro?

I use special userspace driver ported from experimental ChromeOS driver. Original driver never had been in production and was removed from ChromeOS some time ago.

jekhor commented 3 years ago

Oh, all right. Thank you :)

The manual which I promised:

  1. Install the latest touch-keyboard package from https://github.com/jekhor/chromiumos_touch_keyboard/releases/tag/1.4.1
  2. Go to /etc/touch_keyboard/layouts/
  3. Remove existing layout.csv symlink
  4. make new symlink to your variant: ln -s YB1-X9x-pc104.csv layout.csv
jekhor commented 3 years ago

I re-checked, your variant is PC-105 and it is used by default in the touch-keyboard 1.4.1 package.

Txori commented 3 years ago

Thanks, I saw that. It was working nicely on Xubuntu following your manual, but since then, I formatted to Neverware's CloudReady and didn't start playing with chromiumos_touch_keyboard yet. I think I'll try with FydeOS too.