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

JoyToKey timed press #29

Open
1 task
paoloambrosio opened this issue May 27, 2021 · 0 comments
Open
1 task

JoyToKey timed press #29

paoloambrosio opened this issue May 27, 2021 · 0 comments
Labels
enhancement New feature or request
Milestone

Comments

@paoloambrosio
Copy link
Contributor

paoloambrosio commented May 27, 2021

  • Support short or long key presses (example from ACC)

Example configuration and expected behaviour:

usb_input:
- device: Fanatec CSL Elite
  rules:
  - controls:
    - Button 4
    events:
    - name: flasher
    - min_press_ms: 500
      name: toggle_lights
  • If TimeReleased-TimePressed < 500ms (the button is released within 500ms), send KeyDown and KeyUp at TimeReleased.
  • Otherwise, send KeyDown at TimePressed+500ms, send KeyUp at TimeReleased.
  • Note: as timestamp for the event KeyDown always uses TimePressed and KeyUp uses TimeReleased, no matter when they are generated.

We should be able to support delays for multiple button combinations (to avoid generating events for the single buttons being pressed):

usb_input:
- device: Fanatec CSL Elite
  rules:
  - controls:
    - Button 1
    - Button 2
    events:
    - name: together
  - controls:
    - Button 1
    events:
    - min_press_ms: 50
      name: one
  - controls:
    - Button 2
    events:
    - min_press_ms: 50
      name: two
@paoloambrosio paoloambrosio added the enhancement New feature or request label May 27, 2021
@paoloambrosio paoloambrosio added this to the 0.3 milestone May 27, 2021
@paoloambrosio paoloambrosio mentioned this issue May 27, 2021
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant