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

Issue with Keybinds on Linux with Streamdeck #276

Open
fagidutt opened this issue Feb 13, 2025 · 4 comments
Open

Issue with Keybinds on Linux with Streamdeck #276

fagidutt opened this issue Feb 13, 2025 · 4 comments

Comments

@fagidutt
Copy link

Sorry for the non-technical report, since i only observed the behaviour in a busy event where i was not able to gather data but hat to quickly revert to a working solution. Still thought, it should be mentioned here, in case others experience this aswell.

On Tuesday, i encountered an issue with the latest Trackaudio 1.3.0 Beta 5. I will update this issue as soon as i have more information to share.

For reference (and in case somebody tries to do a repro): I am using StreamDeck (XL?...) configured with OpenDeck on Linux Mint 22.1. My PTT button in OpenDeck is configured with xdotool to press F13 while the respective button is pressed . I set up the appropriate mappings via .Xmodmap, which works for other applications, without issues (including TA 1.2.0). On version 1.2.0, TA would even show the PTT button as F13.

However in the latest beta, and thats why i got caught a bit cold, while pressing the PTT button on the streamdeck does detect a button in TA, the button is shown as ?. However, when i was online, and trying to coordinate with other controllers, I realised, that my Teamspeak PTT would also activate my TA PTT. After some quick testing i realised, that all my StreamDecks buttons trigger the TA PTT. Even those buttons that are unassigned alltogether.

Since this was during the session, i reverted to find TA 1.2.0 do exactly what it's supposed to do. I plan on making a few tests to see where it could lie, but also don't know where to start yet, really. It's as if the streamdeck is recognized by TA as being one big button.

@fagidutt
Copy link
Author

fagidutt commented Feb 13, 2025

I was able to establish the following:
Whenever i press any key on the StreamDeck, i get 2 input events. One for keycode 248, comes, whatever button i press on the deck, and shows up as NoSymbol. The other one is the actual keycode i configured (191), which is being recognized as F13 on version 1.2.0. I did so far not find a way to avoid the unneccessary first key event. Is there a specific reason that 1.2 seems to ignore that first event, but 1.3 does not?

edit to add some reference. this is the xev log for one keypress:

KeyPress event, serial 38, synthetic NO, window 0x7200001,
    root 0x4a1, subw 0x0, time 1444733, (637,553), root:(3247,1201),
    state 0x10, keycode 248 (keysym 0x0, NoSymbol), same_screen YES,
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

MappingNotify event, serial 39, synthetic NO, window 0x0,
    request MappingKeyboard, first_keycode 8, count 248

KeyPress event, serial 39, synthetic NO, window 0x7200001,
    root 0x4a1, subw 0x0, time 1444741, (637,553), root:(3247,1201),
    state 0x10, keycode 191 (keysym 0x1008ff81, XF86Tools), same_screen YES,
    XKeysymToKeycode returns keycode: 179
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

MappingNotify event, serial 40, synthetic NO, window 0x0,
    request MappingKeyboard, first_keycode 8, count 248

KeyRelease event, serial 40, synthetic NO, window 0x7200001,
    root 0x4a1, subw 0x0, time 1444823, (637,553), root:(3247,1201),
    state 0x10, keycode 248 (keysym 0x0, NoSymbol), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False

MappingNotify event, serial 41, synthetic NO, window 0x0,
    request MappingKeyboard, first_keycode 8, count 248

KeyRelease event, serial 41, synthetic NO, window 0x7200001,
    root 0x4a1, subw 0x0, time 1444830, (637,553), root:(3247,1201),
    state 0x10, keycode 191 (keysym 0x1008ff81, XF86Tools), same_screen YES,
    XKeysymToKeycode returns keycode: 179
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False

@neilenns
Copy link
Contributor

I'm not familiar with OpenDeck, but will it install/work with plugins from the Marketplace? The TrackAudio for Stream Deck plugin has a PTT action in it that you can use instead of trying to deal with keybinds.

Failing that, is there a way to send a websocket event from an OpenDeck key? If so, you can simply send the correct kPttPressed and kPttReleased events via the websocket directly to TrackAudio.

@fagidutt
Copy link
Author

fagidutt commented Feb 13, 2025

The mentioned plugin seems to work, but then crashes OpenDeck after a few seconds.
I will have to see how the Websocket way would work with OpenDeck if at all.
In any case, i will still need the keypresses for other occasions, and apart from this issue, they work fine.

Will update regarding the Websocket option once i have found more information.

@Ades128
Copy link

Ades128 commented Feb 16, 2025

same for me on Arch Linux using F14 as PTT and not correctly set on settings.ini, (@pierr3 we talked about that few days ago).
Seems from F13 and higher doesn't work
https://github.com/pierr3/TrackAudio/blob/main/backend/src/InputHandler.cpp

here maybe some clues to improve but my competencies are limited here :) (thanks @herver )
https://www.sfml-dev.org/documentation/3.0.0/namespacesf_1_1Keyboard.html

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

No branches or pull requests

3 participants