So I have tried to play around with joystick's algorithms a little bit and made QMK PR in the end.

all 4 comments

sorted by: hot top controversial new old
[–] 2 points 2 years ago (1 child)

I haven't started experimenting around with the code for joysticks but am in the middle of making a keyboard (half) with a joystick. Did you find it worked ok just for acting as keyboard keys/combinations of keys?

I see under the 'Accelerated' portion where you tried to emulate mouse keys there weren't really any results?

  • source
  • hideshow 2 child comments
  • [–] [S] 2 points 2 years ago* (1 child)

    Hi, I have only tried using joystick as mouse and improve that. While doing this I found one suggestion how to do what you are looking for here: https://www.reddit.com/r/olkb/comments/vgo39f/qmk_simple_question_is_it_possible_to_use/

    You might find this interesting as well: https://github.com/qmk/qmk_firmware/blob/master/docs/feature_pointing_device.md#advanced-drag-scroll

    BTW, are you creating custom keyboard (your own) or you just chosen something with joystick?

  • source
  • parent
  • hideshow 2 child comments
  • [–] 1 point 2 years ago

    I'm not sure what sort of joystick you're using, but you can get a simple analog one working without much work.

    I use some hall effect ones in this keyboard:

    https://github.com/sffubs/dactyl_manuform_gimbal

    They are analog joysticks, so generate a voltage that indicates the position. The joystick code is in here:

    https://github.com/sffubs/qmk_firmware/blob/master/keyboards/handwired/dactyl_manuform_gimbal/dactyl_manuform_gimbal.c

    Unfortunately it's not too well organised, but it just does an analogReadPin to get an X/Y value, scales it to the desired mouse values, and sends it using a pointing_device_task.

    I am a big fan of joystick pointing devices, would love to see what you end up making!

  • source