Opened 15 years ago

Closed 15 years ago

#1492 closed defect (fixed)

Problems with arrow keys in DVD menus

Reported by: mythtv@… Owned by: skamithi
Priority: minor Milestone: 0.20
Component: mythtv Version: head
Severity: medium Keywords: DVD menu keypress
Cc: Ticket locked: no


I have the arrow keys (UP, DOWN, LEFT, and RIGHT) on my remote control mapped to skip forward/backwards 5 mins and commercial breaks for TV playback, as the remote doesn't have track skip buttons. When attempting to navigate a DVD menu using the internal DVD player these functions appear above the DVD menu navigation calls in the TV::ProcessKeypress?() function and therefore when I press the arrow keys in an attempt to navigate the DVD menu I get errors about being unable to skip or that commercials are not flagged for the DVD.

The attached patch rearranges the TV::ProcessKeypress?() function in order to make DVD menus a higher priority.

Attachments (3)

DVD_menu_control.patch (2.6 KB) - added by mythtv@… 15 years ago.
block_certain_keypresses_when_watching_dvd.patch (2.7 KB) - added by skamithi 15 years ago.
if anyone has a better way of doing this. please share.
ticket_1492_proposed_final.patch (4.7 KB) - added by skamithi 15 years ago.
mesh of pete's patch and my patch.

Download all attachments as: .zip

Change History (10)

Changed 15 years ago by mythtv@…

Attachment: DVD_menu_control.patch added

comment:1 Changed 15 years ago by skamithi

Owner: changed from Isaac Richards to skamithi

Changed 15 years ago by skamithi

if anyone has a better way of doing this. please share.

comment:2 Changed 15 years ago by skamithi

Status: newassigned

i think a better way to solve your problem is to prevent the keypress from been activated when watching a dvd. posted a diff for this. if no one has issues with it or has any better ideas, i'll commit it next week.

comment:3 Changed 15 years ago by mythtv@…


Thanks for looking into this for me. Unfortunately your updated patch does not solve the problem I am having.

I have only had an opportunity to give your patch a quick test and have not preformed any detailed debugging of what is going on. The patch has eliminated the warnings regarding commercials not being flagged but the arrow keys still cannot be used for navigating the DVD menu (something which my original proposal addressed for my particular setup).

My understanding (admittedly not very comprehensive) of the behaviour of the keypress code was that every keypress produces a list of matching actions, the list of potential actions is then filtered by the code in the TV::ProcessKeypress?() function, the first match being acted upon. This filtering appears to be grouped into various functional states, e.g. teletext, interactive TV, navigating the menu, browse mode, etc.

The reasoning behind my code rearrangement was, if you’re watching a DVD and you enter the DVD menu, that would be the highest priority thing that was happening. It’s almost like the DVD menu is overlaid upon the normal DVD film playback.

So, for example, I have the left and right arrows on my remote control mapped to “Global” “LEFT”/”RIGHT”, “TV Playback” “JUMPRWND”/“JUMPFFWD”, at the moment the “JUMPRWND”/”JUMPFFWD” actions for DVD are chapter previous/next, which makes a lot of sense. However, when in a DVD menu, the left/right keys perform the next/previous track functions, which exits from the menu. If I had these actions mapped to separate keys, then it would probably makes sense that performing a “JUMPFFWD” action from within a DVD menu would result in playback resuming from the next DVD chapter, however, with both “RIGHT” and “JUMPFFWD” mapped to the same key I actually want the DVD menu cursor to shift right.

I think that most (if not all) of the changes in your patch are desirable, there are certain functions that do not appear make much sense when the TV playback object is actually playing back a DVD (things like bring up the program guide). However, I think that raising the relative importance of being inside a DVD menu may also be desirable.

I appreciate that this problem is a result of the way that I have configured my remote. I have an ATI Remote Wonder II, which does not have track skip buttons and hence I have remapped the left/right arrow keys to perform these functions. This arrangement works for interactive TV (I’m in the UK with Freeview/DVB tuners) because the interactive TV keypress logic appears near the top of the TV::ProcessKeypress?() function, and the interactive TV appears as a popup/overlay to the TV.


comment:4 Changed 15 years ago by skamithi

I understand your point. My main concern is that if mythtv is matching JUMPFFWD instead of RIGHT and changing the track, and this seems to be problem, then I feel it would be better to prevent JUMPFFWD from been a match when in the dvd menu.

Reason is, let's say someone else maps JUMPFFWD to another button..and hits JUMPFFWD in the dvd menu. It shouldn't do anything.. so writing a general patch that resolves your problem and what i just described would be best. Just trying to generalize the problem you described and fix it for all the possible scenarios.

Is JUMPFFWD and JUMPRWND the only other actions you have a problem with?

comment:5 Changed 15 years ago by mythtv@…


Sorry, I thought that JUMPFFWD/JUMPRWND inside a DVD menu was supposed to be a valid action (your patch didn’t exclude these). So I was considering the case where a key bound to a valid action was pressed, only a more valid action would ideally be chosen first (i.e. RIGHT as opposed to JUMPFFWD).

I agree that excluding all non-valid actions from inside a DVD menu is a better approach, I am just unsure as to whether it is possible to distil the valid actions down to a sufficiently small subset that results in no similar conflicts for other user’s configurations? (I’m still doing pattern matching when I look at the code, without having an in-depth understanding of what is going on, or intended to be going on ;-))

As I mentioned, I haven’t debugged the exact behaviour yet but your patch does prevent certain actions from occurring, specifically the commercial skips (bound to Up and Down keys) however it did not enable the underlying functions of these keys (i.e. UP and DOWN).

So, with you patch applied, UP does not result in a “Commercials not flagged” warning, but it does not result in the cursor in the DVD menu moving up either…



Changed 15 years ago by skamithi

mesh of pete's patch and my patch.

comment:6 Changed 15 years ago by skamithi

peter i meshed your patch and mine together. there was a minor bug in yours. caused dvdbutton movement to occur twice in mine case. i map UP and CHANNELUP to the same button.

let me know what you think. patch blocks user from executing skip commercial, toggleedit, jumpbkmrk, open program guide/finder, and moves the dvd button actions further up in the function as you proposed. i left jumpffwd and jumprwnd alone. jumpffwd is useful so you can jump past the long intro on some dvd menus.

i'll test it a little more but i don't think this should affect any other aspect of mythtv button action.

comment:7 Changed 15 years ago by skamithi

Resolution: fixed
Status: assignedclosed

(In [9836]) Closes #1492. Blocks certain keypresses when watching a dvd. Checks dvd menu actions earlier in the ProcessKeypress? function.

Note: See TracTickets for help on using tickets.