UltimateHackingKeyboard / firmware

Ultimate Hacking Keyboard firmware
Other
410 stars 63 forks source link

Unexpected mouse button behavior (mouse buttons 4 - 20) #772

Closed nathanph closed 2 weeks ago

nathanph commented 2 months ago

Binding a key to MOUSE_BUTTON_4 (which I believe is typically understood to be MOUSE_WHEEL_UP) emits button 8. This is true for all mouseBtn# values.

Is this expected behavior?


xev output

ButtonPress event, serial 37, synthetic NO, window 0x4000001,
    root 0x275, subw 0x0, time 38927967, (108,108), root:(278,259),
    state 0x0, button 8, same_screen YES

ButtonRelease event, serial 37, synthetic NO, window 0x4000001,
    root 0x275, subw 0x0, time 38928080, (108,108), root:(278,259),
    state 0x0, button 8, same_screen YES

Broken Macro Examples

// Actual: Mouse Button 8 (BACK?)
// holdKey mouseBtn4

// Actual: Mouse Button 9 (FORWARD?)
// holdKey mouseBtn5

// Actual: Mouse Button 10
// holdKey mouseBtn6

// Actual: Mouse Button 11
// holdKey mouseBtn7

// Actual: Mouse Button 12
// holdKey mouseBtn8

// Actual: Mouse Button 13
// holdKey mouseBtn9

// Actual: Mouse Button 24
holdKey mouseBtn20

Broken mouse action

{
  "keyActionType": "mouse",
  "mouseAction": "button4"
},

Working mouse action

Binding a key to mouse scroll up/down seems to work fine, but that can't be done from within a macro so far as I can tell.

{
  "keyActionType": "mouse",
  "mouseAction": "scrollUp"
},
kareltucek commented 2 months ago

Binding a key to mouse scroll up/down seems to work fine, but that can't be done from within a macro so far as I can tell.

What about:

startMouse scroll up
delayUntilRelease
stopMouse scroll up

As for the shift in mouse buttons, I will look into it.

mondalaci commented 1 month ago

I don't think the output of xev correlates with actual mouse button numbers beyond mouse button 3. When using my dedicated mouse:

UHK mouse button 4 starts at xev button 8 and the rest follows.

@benedekkupper Do you have any insight about the above?

kareltucek commented 1 month ago

Indeed, my external mouse buttons 4 and 5 also report 8 and 9 in xev.

I.e., so far does not look like a bug.

Is there actually anything broken about your setup? If so, what is it that is broken?

mondalaci commented 2 weeks ago

Looks like a non-issue, so closing it. Feel free to follow up nevertheless.