Hello!

Stephan Sokolow has written on Wednesday, 18 July, at 20:37:
>The whole point of a global hotkey is that it fires no matter which 
>window has focus. (And I use XGrabKey to make my volume-control keys 
>function while inside games that would otherwise exclusively grab the 
>entire keyboard)

    It seems I said it bad so was misunderstood. Sorry. I meant not
global shortcuts for global operations but rather global configuration
of shortcuts for applications, such as 'Copy', 'Paste', 'Reload', etc.
Instead of hardcoding them or having some own configurator in every
application - to have them configurable by common tool. You know, KDE
hotkeys editor also has different tabs for that - one for globals and yet
one for applications. But still it's in one tool for all applications.
And I'm talking about that, not global hotkeys.

>So... you're not really talking about "global hotkeys" but rather 
>"unified and/or standardized configuration of application-specific hotkeys"?

    That's correct!

>I'm not sure I'd want the complexity UNIFIED keybinding stuff would 
>bring (Just getting people to agree on where to store the keybindings 
>could be a fight and I never saw the point to throwing the keybindings 
>for every application on the system together into one confusing control 
>panel).

>However, I'd definitely like to see a keybinding library that makes it 
>easy to add a standard "edit keybindings" dialog to any GTK+ app, 
>independent of which desktop you're using.

>I'd envision such a library having at least two parts:

>First, some kind of KeybindingManager which abstracts away the binding 
>of keys and the serialization and deserialization of action-hotkey mappings.

>In my eyes, such a thing would center around a method which takes an ID, 
>a human-readable title, a default keybind, a callback, and an optional 
>set of widgets to act as a scope. (With the ability to add widgets to a 
>given ID as they're created).

>Second, a standardized compound widget for editing keybindings, a dialog 
>which wraps it, possibly a widget for viewing and editing a single 
>keybind (a la GtkFileChooserDialog, GtkFileChooserWidget, and 
>GtkFileChooserButton), and a new stock icon and pre-translated "edit 
>keyboard shortcuts" title suitable for adding to menus.

>Third, a Vala .vapi and some GObject Introspection definitions so 
>language wrappers like PyGI can use it, to provide the highest return on 
>investment to get other developers using it quickly.

>If those two things were offered, I'd definitely use it in my own apps. 
>As is, I tend to just limit my non-global keybindings to the built-in 
>Alt+Accelerator support for widgets.

    Ouch, that's a lot really. But most of that could be simplified just
knowing gtk_accelerator_parse() accepts char * so the config can be in
plain text with keys defined as (for example) "hideall=<Ctrl>h,<Alt>F12"
and library will just parse and fill caller's array with such texts which
will be eaten by gtk_action_group_add_actions(). I think the Qt has some
similar methods too. And I think of that library as something very simple
not bound to Gtk, Qt, or whatever at all. And of course, it is possible
to write a Gtk+ widget over it which will implement what you've described
above.
    And anyway I've asked not about implementation yet but about the
idea to have configured it in common tool. But I cannot see if you like
it or not. From what I see you want still each application to have own
keybindings? And if I want to set 'fullscreen' key to be F12, I have to
set it in each application if that application decided to implement the
dialog and is written with Gtk+ support, right? And those that aren't
will have it hardcoded still... I don't see much reasons why I would use
it, may be only to correct too different bindings which some application
might have but it's rather rarely and as developer I don't see much of
advantage but I rather would prefer the KDE way where I set it in some
keybinding editor once and for all applications.

    Andriy.

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Lxde-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/lxde-list

Reply via email to