USB HID Joysticks and Gamepads

Audio software developers forum.
Forum rules
If you require help using Audacity, please post on the forum board relevant to your operating system:
Windows
Mac OS X
GNU/Linux and Unix-like
jliu83
Posts: 16
Joined: Wed Oct 31, 2012 1:03 pm
Operating System: Please select

Re: USB HID Joysticks and Gamepads

Post by jliu83 » Fri Nov 02, 2012 3:22 am

As a side note, the out of focus command implementation of VLC is very nicely done. Perhaps such key binding for global variables can be implemented for Audacity in the future? This will allow keyboard bindings to send commands to Audacity without having the program selected.

See:
http://wiki.videolan.org/How_to_set_global_hotkeys

The implementation uses two columns for key bindings, one for when the program is in focus, and another "global" column. The shortcuts under the global column automatically binds to a function, even when VLC is not in focus.

Also, it is confirmed that Audacity seems to consume the events sent to it when it is out of focus:
http://www.autohotkey.com/board/topic/3 ... ackground/
Another user of autohotkey has tried this before, same issue. There must be a line in the code, or some behavior, that is telling the events to be consumed when it is sent to Audacity.

-J

steve
Site Admin
Posts: 81627
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: USB HID Joysticks and Gamepads

Post by steve » Fri Nov 02, 2012 4:19 am

jliu83 wrote:AutoHotKey covers just about every possible binding possible so if it can be made to work with Audacity, that would save a ton of programming.
But AutoHotKey is Windows only.
Linux has a program called "AutoKey" http://code.google.com/p/autokey/
I don't know about OS X.

I'm not a programmer, but one issue that may be a problem with enabling global hot keys in Audacity is that it may conflict with screen reader support.
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

Gale Andrews
Quality Assurance
Posts: 41761
Joined: Fri Jul 27, 2007 12:02 am
Operating System: Windows 10

Re: USB HID Joysticks and Gamepads

Post by Gale Andrews » Fri Nov 02, 2012 5:05 am

I'll add the vote for global shortcuts.
steve wrote:one issue that may be a problem with enabling global hot keys in Audacity is that it may conflict with screen reader support.
Supported global shortcuts on Windows usually have the Windows key modifier, so at least should not interfere with default Audacity shortcuts.


Gale
________________________________________FOR INSTANT HELP: (Click on Link below)
* * * * * Tips * * * * * Tutorials * * * * * Quick Start Guide * * * * * Audacity Manual

jliu83
Posts: 16
Joined: Wed Oct 31, 2012 1:03 pm
Operating System: Please select

Re: USB HID Joysticks and Gamepads

Post by jliu83 » Fri Nov 02, 2012 11:39 am

steve wrote:But AutoHotKey is Windows only.
Well the request is for global shortcuts. I think such a feature can benefit many people who are using the program, especially since it is possible to implement it from a cross-platform point of view, just like VLC. How the global shortcuts are used can be platform independent. I'll take a look at the source when I have time to see why the events are being consumed when Audacity is not in focus or when it is minimized. Thanks.

-J

Gale Andrews
Quality Assurance
Posts: 41761
Joined: Fri Jul 27, 2007 12:02 am
Operating System: Windows 10

Re: USB HID Joysticks and Gamepads

Post by Gale Andrews » Fri Nov 02, 2012 11:36 pm

jliu83 wrote:
steve wrote:But AutoHotKey is Windows only.
Well the request is for global shortcuts. I think such a feature can benefit many people who are using the program, especially since it is possible to implement it from a cross-platform point of view, just like VLC.
I've looked a bit further into this. With the version of wxWidgets that we use (2.8.12) it's still the case that global shortcut support is Windows only.

To get cross-platform support we would have to update to a 2.9 version of Widgets:
http://trac.wxwidgets.org/ticket/12354

but unfortunately a great deal of housekeeping on the Audacity code is needed before we can update.

VLC moved to QT a long time ago:
http://wiki.videolan.org/WxWidgets_Interface .


Gale
________________________________________FOR INSTANT HELP: (Click on Link below)
* * * * * Tips * * * * * Tutorials * * * * * Quick Start Guide * * * * * Audacity Manual

jliu83
Posts: 16
Joined: Wed Oct 31, 2012 1:03 pm
Operating System: Please select

Re: USB HID Joysticks and Gamepads

Post by jliu83 » Sun Nov 04, 2012 11:16 am

I see. QT or GTK+ would be much more mainstream, and perhaps a larger programmer base.

I've looked a bit into mod-pipe-script. It seems like using the "MenuCommand" might be the way to go. However, some of the commands such as "play/stop" implemented on the space button is is not listed on a menu (just to name one). How would such commands be invoked?

-J

steve
Site Admin
Posts: 81627
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: USB HID Joysticks and Gamepads

Post by steve » Sun Nov 04, 2012 12:07 pm

jliu83 wrote:However, some of the commands such as "play/stop" implemented on the space button is is not listed on a menu
"Play" and "Stop" are listed (separately) in the Transport menu.
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

Post Reply