Page 2 of 2

Re: USB HID Joysticks and Gamepads

Posted: Fri Nov 02, 2012 3:22 am
by jliu83
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

Re: USB HID Joysticks and Gamepads

Posted: Fri Nov 02, 2012 4:19 am
by steve
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.

Re: USB HID Joysticks and Gamepads

Posted: Fri Nov 02, 2012 5:05 am
by Gale Andrews
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

Re: USB HID Joysticks and Gamepads

Posted: Fri Nov 02, 2012 11:39 am
by jliu83
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

Re: USB HID Joysticks and Gamepads

Posted: Fri Nov 02, 2012 11:36 pm
by Gale Andrews
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

Re: USB HID Joysticks and Gamepads

Posted: Sun Nov 04, 2012 11:16 am
by jliu83
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

Re: USB HID Joysticks and Gamepads

Posted: Sun Nov 04, 2012 12:07 pm
by steve
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.