How should OMG handle "shortcuts" configuration
Closed, ResolvedPublic

Description

Obviously, the User should be able to configure how exactly their extra peripherals get used by krita.

It should be possible - even easy - to bind buttons on a joystick, OSC control pad or MIDI device to any action you can assign a regular keyboard shortcut to. But I don't think that means I should add that stuff to the existing "configure shortcuts" widget, as it'd easily become crowded and chaotic.

Another thing that comes to mind is that - especially with game controllers and their very limited amount of buttons - a "mode switch" would be very handy.

On top of that, there's extra things that want to be configurable, such as "assign a given button to a given brush preset", which is currently not possible with the shortcut configuration widget.

How should this be handled?

tpaulssen updated the task description. (Show Details)
tpaulssen raised the priority of this task from to Wishlist.
tpaulssen claimed this task.
tpaulssen added a project: Krita.
tpaulssen added subscribers: rempt, woltherav, tpaulssen.
tpaulssen added a subscriber: abrahams.

wolthera pointed out that @abrahams is currently working on the shortcut stuff, so maybe a CC is warranted

abrahams added a comment.EditedJan 2 2016, 6:23 AM

The "configure shortcuts" stuff could get messy I think, because it relies entirely on the Qt event system. You'd have to generate some custom Qt events that the ShortcutEditWidget could capture, and annoyingly if you want to keep the same configuration options, you'd have to do some serialization/deserialization that extends QKeyboardShortcut. The whole thing is not very fun to work with anyway because it's sort of a mish mash of KDE's XMLGUI and Krita's custom system. It's also limited to managing QActions and their metadata. Finally, writing this part is probably the least important part because another option exists already: just bind your joystick buttons to unused combinations like Ctrl+Shift+F1..Ctrl+Shift+F12 in the joystick driver, then bind the keyboard combos separately in Krita. So that part of the project is really more icing on the cake than core functionality.

On the other hand, you'll need to access the KActionCollections somehow if you want to be able to assign arbitrary shortcuts, so to assign arbitrary shortcuts like you say would eventually require hooking into that part of the code.

Everything inside the "Canvas Input Settings" configuration is self-contained. If you add your configuration there you won't have any conflicts with the stuff I'm working on. It's a pretty well designed interface too, even if it simply serves as inspiration to write something new. You can start looking into KisInputProfileManager and KisInputConfigurationPage to see how that part works. My recommendation is start there, providing some basic settings for things like changing the size or opacity with a foot pedal, and then later you can write the part that binds to QActions.

scottpetrovic closed this task as Resolved.Apr 17 2018, 1:26 PM
scottpetrovic added a subscriber: scottpetrovic.

I talked with timotimo and we are ok closing this out for now.