pierr3 / TrackAudio

A next generation Audio-For-VATSIM ATC Client for macOS, Linux and Windows
Other
52 stars 11 forks source link

Impossible to use F13-F24 keys as push to talk hotkey on linux #181

Closed fagidutt closed 1 month ago

fagidutt commented 1 month ago

In Audio For Vatsim it is possible to use logical function keys F13 to F24 as push to talk hotkey. While those buttons do not normally exist on a keyboard, they can be mapped via Streamdeck for example.

Is it possible to implement the possibility to use one of those keys as the push to talk key?

For reference, i'm running Linux Mint, so maybe this is something that just doesn't work on linux? Would in any case be highly appreciated, if this would work.

neilenns commented 1 month ago

They work fine in TrackAudio, at least on Windows. I use F13 for my PTT key.

If you are using StreamDeck, however, you can directly use the StreamDeck TrackAudio actions. They include a dedicated PTT action. https://github.com/neilenns/streamdeck-trackaudio

fagidutt commented 1 month ago

Since the manufacturer stream deck software is not compatible with linux, i use Bitfocus Companion to program it. The plugin therefore is no option, as i don't think there is a way to install streamdeck plugins in that application. I verified that the OS recognizes the key strokes, however they are not registered in Trackaudio. I saw that this seems to work on windows, in unrelated Issues, but unfortunately not in Linux, it seems.

fagidutt commented 1 month ago

I was able to fix this issue by manually adding keymappings, as those are not supplied by default in Mint Linux. Adding it here in case someone at some point stumbles over the same issue. The solution was found here

I had to create a file '$HOME/.Xmodmap' with the content:

! XF86Mail
keycode 163 = F25 F25 F25
# Not sure if the above line needs to be in there, but left it anyways, as i don't think it hurts.

keycode 191 = F13 F13 F13
keycode 192 = F14 F14 F14
keycode 193 = F15 F15 F15
keycode 194 = F16 F16 F16
keycode 195 = F17 F17 F17
keycode 196 = F18 F18 F18
keycode 197 = F19 F19 F19
keycode 198 = F20 F20 F20
keycode 199 = F21 F21 F21
keycode 200 = F22 F22 F22
keycode 201 = F23 F23 F23
keycode 202 = F24 F24 F24
pierr3 commented 1 month ago

Thanks for sharing! Great to see that there was a system solution