kimmoli / tohkbd2

28 stars 10 forks source link

Option to trigger hold down -event instead of repeat, when key is held down #62

Open olzraiti opened 8 years ago

olzraiti commented 8 years ago

This would allow us to use TOHKBD as a controller for retro emulators. The layout even looks like if it was designed for gaming with the arrow pad on the left!

kimmoli commented 8 years ago

Yes, there were some tests on this issue, but nothing finished yet.

@urjaman dare to comment?

urjaman commented 8 years ago

After some meddling with OBS and git, now i dare :P So yeah I have a modification that basically does this, though its not an option toggle and it breaks the key repeat rate settings. A diff is best viewed at:

https://github.com/kimmoli/tohkbd2/compare/master...urjaman:physicallayout

and i made OBS make me an rpm of it if you want to test it out:

http://repo.merproject.org/obs/home:/urjaman:/tests/sailfish_latest_armv7hl/armv7hl/harbour-ambience-tohkbd2-0.20.53-10.2.1.jolla.armv7hl.rpm

Do note the "tests" in the path, no promises on updating this repo or what it would bring you if you add it... (I used the 20 for version so you will need to manually downgrade to the 0.5.series after testing...)

If somebody wants to dive into the depths of uinput -> kernel -> whatever-qt-wayland-jolla-has -> apps chain about key repeats and fix it / report-where-borked, it'd be cool. I'm prepared to #blame-jolla as usual, heh...

Details: I send repeats as value = 2 because based on quick googling this is what the kernel uses internally for generated key repeats. It seems that somehow

  1. The VT system (that you dont see on the jolla but still exists) sees the value = 2 repeats just fine but
  2. the Qt apps/wayland just see the held key and generate their own (fast-ish/default) repeat

(Note: VT repeat detected by pressing alt-left/right that causes a getty to be spawned and then text + enter + enter makes an errored out login message with the username = text... so yeah thats funny)