Bug 394076

Summary: After changing key shortcuts, old bindings still active and conflicting.
Product: [Applications] kaffeine Reporter: romeoK <romeoknight>
Component: generalAssignee: Mauro Carvalho Chehab <mchehab>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version First Reported In: 2.0.15   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description romeoK 2018-05-10 10:46:22 UTC
(I'm using the german language version, so the terms might be slightly different)

the standard shortcut for 'moving 15s' forward is set to 'cursor right'
the standard shortcut for 'moving 15s' backward is set to 'cursor left'

Now, for example i want to use the cursor left/right for changing the volume.

I set the shortcut for volume up to 'cursor right'. Kaffeine asks if i want to reassign the key to the new shortcut, i say 'yes'
I set the shortcut for volume down to 'cursor left'. Kaffeine asks if i want to reassign the key to the new shortcut, i say 'yes'

I press ok, and close Kaffeine.

Next time i start Kaffeine and use the newly assigned keys, it says "there is a conflict/double with these keys"

When you go back into settings/shortcuts, you can see that Kaffeine has not deleted the original keys bindings.
Comment 1 romeoK 2018-05-10 11:13:19 UTC
additional comment: After assigning new keys, as long as you don't restart Kaffeine, the bindings work.
Comment 2 Mauro Carvalho Chehab 2019-05-05 17:59:50 UTC
Git commit 9d2d2149373813d2b115497d233a028e51d994e2 by Mauro Carvalho Chehab.
Committed on 05/05/2019 at 17:57.
Pushed by mauroc into branch 'master'.

mediawidget: Override DVD keys instead of changing their settings

When DVD navigation menu is enabled and a valid DVD key is used,
inhibit shortcut key handle by calling accept() once the key is
handled.

Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>

M  +31   -22   src/mediawidget.cpp
M  +2    -0    src/mediawidget.h

https://commits.kde.org/kaffeine/9d2d2149373813d2b115497d233a028e51d994e2
Comment 3 Mauro Carvalho Chehab 2019-05-05 18:03:34 UTC
(In reply to romeoK from comment #1)
> additional comment: After assigning new keys, as long as you don't restart
> Kaffeine, the bindings work.

The problem here was actually specific to LEFT and RIGHT keys. The root cause is because MediaWidget::dvdMenuChanged was redefining it, due to DVD reproduction.

I reworkted the code, providing a cleaner implementation for DVD menu navigation (with uses UP, DOWN, LEFT and RIGHT keys).

Basically, when DVD is reproduced, it will temporarily override the above keys in order to control the DVD menu. The normal behaviour is returned when reproducing any other type of media.