Conflict in shortcuts

View: New views
5 Messages — Rating Filter:   Alert me  

Conflict in shortcuts

by Bugzilla from stephane@mankowski.fr :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

I have got a problem with short cuts.
(see attached file).

Could you help me ?

Regards,
Stephane


 
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<

pb_shortcuts.pdf (131K) Download Attachment

Re: Conflict in shortcuts

by Bugzilla from aseigo@kde.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On November 10, 2009, Stéphane MANKOWSKI wrote:
> Hi,
>
> I have got a problem with short cuts.
> (see attached file).
>
> Could you help me ?

that is a VERY complicated UI. :/

a simple solution might be to just change the shortcuts on the actions when an
operation or suboperation is selected. so when a subop is chosen, set the
shortcut on the main delete action to nothing and the shortcut on the subop
remove action to "Del", and vice versa.

still, i wonder if that UI couldn't be somehow simpler in general? :)

--
Aaron J. Seigo
humru othro a kohnu se
GPG Fingerprint: 8B8B 2209 0C6F 7C47 B1EA  EE75 D6B7 2EB1 A7F1 DB43

KDE core developer sponsored by Qt Development Frameworks


 
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<

signature.asc (204 bytes) Download Attachment

Re: Conflict in shortcuts

by Bugzilla from kde@michael-jansen.biz :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Wednesday 11 November 2009 00:01:54 Aaron J. Seigo wrote:
> On November 10, 2009, Stéphane MANKOWSKI wrote:
> > Hi,
> >
> > I have got a problem with short cuts.
> > (see attached file).
> >
> > Could you help me ?
>
> that is a VERY complicated UI. :/

That was exactly my first thought.

> a simple solution might be to just change the shortcuts on the actions when an
> operation or suboperation is selected. so when a subop is chosen, set the
> shortcut on the main delete action to nothing and the shortcut on the subop
> remove action to "Del", and vice versa.

The problem seems to be that using [KQ]Actions i just to plain simple. So it is used anytime someone wants to trigger something with the keyboard. Even if not applicable. Every time In their default setting. Which means Window Shortcut. As long as the window associated with the Shortcut/Action has focus it triggers. Which in your case means a conflict and is wrong.

Why trigger any of the two actions if the focus is no inside one of the two list widgets?

You have two possible solutions

1. There are different modes. The mode you want it WidgetWithChildrenShortcut. Associate the Actions with the the corresponding list widget and set that mode. It should work.

2. There is the QShortcutOverrideEvent. Do not set Shortcuts for the two actions. Do not add them to the shortcuts dialog too. I don't think it makes sense to make them configurable. Implement an event filter on each of the Widgets. Look for QShortcutOverrideEvents with the desired key. Eat it and trigger the action.

I would do 2. It's easier to add other keys that don't need a action to implement the desired behaviour this way.

Come to irc and ping me if you have questions. mjansen.
Mike

 
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<

Re: Conflict in shortcuts

by Bugzilla from guillaume.debure@gmail.com :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Le mercredi 11 novembre 2009 01:21:54, Michael Jansen a écrit :
> On Wednesday 11 November 2009 00:01:54 Aaron J. Seigo wrote:
> > that is a VERY complicated UI. :/
>
> That was exactly my first thought.

Yes, you're probably right, and we're conscious of that. We are trying to work on Skrooge usability for the next version 0.6.0, with the help of Joanna, a usability student.

On the precise UI shown in Stephane's document, it is not *that* complicated when you're actually using skrooge, because the use case is a quite complicated one (splitting an operation over several categories). Most financial software do that in a specific window. It is proabably a matter of taste, but I find the skrooge alternative more usable ;-)

There is certainly room for improvement, such as removing the "Remove" button... that we need at the moment because of the conflicting shortcuts =D

>
> > a simple solution might be to just change the shortcuts on the actions when an
> > operation or suboperation is selected. so when a subop is chosen, set the
> > shortcut on the main delete action to nothing and the shortcut on the subop
> > remove action to "Del", and vice versa.
>
> The problem seems to be that using [KQ]Actions i just to plain simple. So it is used anytime someone wants to trigger something with the keyboard. Even if not applicable. Every time In their default setting. Which means Window Shortcut. As long as the window associated with the Shortcut/Action has focus it triggers. Which in your case means a conflict and is wrong.
>
> Why trigger any of the two actions if the focus is no inside one of the two list widgets?
>
> You have two possible solutions
>
> 1. There are different modes. The mode you want it WidgetWithChildrenShortcut. Associate the Actions with the the corresponding list widget and set that mode. It should work.
>
> 2. There is the QShortcutOverrideEvent. Do not set Shortcuts for the two actions. Do not add them to the shortcuts dialog too. I don't think it makes sense to make them configurable. Implement an event filter on each of the Widgets. Look for QShortcutOverrideEvents with the desired key. Eat it and trigger the action.
>
> I would do 2. It's easier to add other keys that don't need a action to implement the desired behaviour this way.
>
> Come to irc and ping me if you have questions. mjansen.
> Mike
>

Thanks to both of you for the help, I know Stephane will have a look at this !

Guillaume
 
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<

Re: Conflict in shortcuts

by Bugzilla from stephane@mankowski.fr :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

Thank you it works !

Regards,
Stephane

Le mercredi 11 novembre 2009 00:01:54, Aaron J. Seigo a écrit :

> On November 10, 2009, Stéphane MANKOWSKI wrote:
> > Hi,
> >
> > I have got a problem with short cuts.
> > (see attached file).
> >
> > Could you help me ?
>
> that is a VERY complicated UI. :/
>
> a simple solution might be to just change the shortcuts on the actions when
>  an operation or suboperation is selected. so when a subop is chosen, set
>  the shortcut on the main delete action to nothing and the shortcut on the
>  subop remove action to "Del", and vice versa.
>
> still, i wonder if that UI couldn't be somehow simpler in general? :)
>
 
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<