Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Palm Rejection for Touchpad #4

Merged
merged 12 commits into from
Apr 15, 2024
Merged

Palm Rejection for Touchpad #4

merged 12 commits into from
Apr 15, 2024

Conversation

iberianpig
Copy link
Owner

@iberianpig iberianpig commented Apr 15, 2024

Palm Rejection for Touchpad Remapper

  • To prevent accidental touchpad operation
    • create a custom dead zone and take measures to detect Thumbsense.
    • touchpad deadzone:
      • 20% on the left and right
      • 10% on the top
    • fetch absinfo using eviocgabs

- Rename `Remapper` to `KeyboardRemapper`
- Rename `RuinputDevicePatched` to `UinputKeyboard`
- Add `RemapTouchpadInput` plugin
  - Subscribe touchpad events from remapper
  - Send events to buffer
- Add `TouchpadRemapper` class
  - Remap touchpad events
  - Send remapped events to virtual touchpad
- Add `UinputTouchpad` class
  - Create virtual touchpad
  - Set absinfo using `eviocgabs`
- Add `exe/fusuma-touchpad-remap` executable
- Add `lib/fusuma/plugin/inputs/remap_touchpad_input.yml` config file
- add layer to remap keyboard input
- send current layer to remap keyboard input
- detect context with current layer for thumbsense
Previously, it was acquired by readline with the default read_from_io,
and the contents of the record were separated by line breaks.
Overriding read_from_io allows you to read MessagePack data with `\n`
- fusuma >= 3.4
  - override `Input#read_from_io` for including `\n` in msgpack stream
- fusuma-plugin-keypress >= 0.11.0
  - use Events::Records::KeypressRecord.new with `layer`
- Update palm detection logic and move it to separate class
- Override read_from_io in input plugin to unpack received data
  - In input plugin, it was separated by newline code with `io.readline(chomp: true)`
  - Override read_from_io and change to receive with `MessagePack.unpack(io)`
  - However, `10` is included when receiving
- Change to send without including newline
  - Change from `@fusuma_writer.puts` to `@fusuma_writer.write`
@iberianpig iberianpig changed the title Create Remap Index / Palm Rejection for Touchpad Palm Rejection for Touchpad Apr 15, 2024
@iberianpig iberianpig merged commit 9d5659e into main Apr 15, 2024
4 checks passed
@iberianpig iberianpig deleted the feat/remap-pointer branch April 15, 2024 09:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant