Project

General

Profile

Feature #163

Configurable hotkeys

Added by anonymous password over 12 years ago. Updated over 11 years ago.

Status:
Rejected
Priority:
Major
Assignee:
-
Category:
plugins/gtkui
Target version:
-
Start date:
August 12, 2012
Due date:
% Done:

0%

Estimated time:
Affects version:

Description

The attached patch adds configurable hotkeys to the latest git master branch. I haven't tested it as current audacious versions don't work with GTK2, but it's based on patches that worked fine.

change_shortcuts_v6.patch (17.4 KB) change_shortcuts_v6.patch patch from 'git diff' anonymous password, August 12, 2012 06:57
change_shortcuts_v7.patch (18.2 KB) change_shortcuts_v7.patch anonymous password, August 13, 2012 04:30

History

#1 Updated by John Lindgren over 12 years ago

  • Affects version 3.3.1 added
  • Affects version deleted (3.4)

The changes to menus.c look good. I don't understand the changes to ui_gtk.c, can you explain their purpose?

#2 Updated by anonymous password over 12 years ago

The changes to ui_gtk.c remove hard-coded shortcuts (because they could conflict with users' choices and can be duplicated in configuration if the user so chooses) and allow text entry widgets to receive text-editing shortcuts at a higher priority than user-defined shortcuts.

#3 Updated by John Lindgren over 12 years ago

I don't think we can accept a patch that removes the legacy playback shortcuts (z, x, c, v, b); it would inconvenience too many users who are used to these shortcuts.

#4 Updated by anonymous password over 12 years ago

Sure thing; I wasn't sure what behavior was preferred. Fixed to retain those shortcuts, but allow them to be overridden by other functions if the user explicitly sets them.

#5 Updated by John Lindgren over 12 years ago

Okay, that looks better. Please explain this logic, though:

if ((event->keyval == ' ' && ! (event->state & GDK_CONTROL_MASK)) && GTK_IS_TREE_VIEW (gtk_window_get_focus ((GtkWindow *) widget)))

#6 Updated by anonymous password over 12 years ago

That's a direct consequence of needing to allow key_press_cb in audacious's libaudgui/list.c to disable GTK's 'spacebar activates the selected row in a gtktreeview' behavior. It checks if the focused widget is a list view, if the key is the spacebar, and if ctrl is not held; if all those are true, it considers the hotkey unhandled so that the treeview (rather than the window) can handle it to cancel that action.

#7 Updated by John Lindgren over 12 years ago

If I understand you correctly, you are saying that gtk_window_propagate_key_event() would somehow bypass key_press_cb() in libaudgui/list.c. Is that right?

#8 Updated by John Lindgren over 12 years ago

I just tried running Audacious with your patch. The spacebar doesn't work for pause any more; this would be a major regression.

#9 Updated by John Lindgren over 12 years ago

Also, I did not notice any change in behavior when commenting out these lines, so I'm still not sure what they are meant to accomplish:

    if ((event->keyval == ' ' && ! (event->state & GDK_CONTROL_MASK)) && GTK_IS_TREE_VIEW (gtk_window_get_focus ((GtkWindow *) widget)))
        return FALSE;

#10 Updated by John Lindgren over 11 years ago

  • Status changed from New to Rejected

Closing due to lack of response.

Also available in: Atom PDF