Mailing List Archive

mythfrontend keybindings
I'm 99% complete with getting mythfrontend setup on a Core i7
development system, stuck in a closet and connected to my 4K UHD TV.

I'm having to use RF wireless keyboard, mouse, and remote control. Using
IR is not easily done in the application.

Since I'm using Xubuntu 20.04 I have certain keybindings that are tied
to XFCE and can't be used by mythfrontend by default.  I have edited
Settings -> Keyboard to fix most of these.  However, pause/play are not
configured in those settings, so I don't know where to fix these.

I do know that when I use mythfrontend Edit Keys that I can't change
pause or play. In fact Edit Keys doesn't even seen them when pressed.

However, when I use the default media app, Parole, the remote pause and
play do work.

Any idea on where I can remote the keybinding for pause and play so
mythfrontend can grab them.

Jim A


_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: mythfrontend keybindings [ In reply to ]
On Mon, 18 May 2020 06:58:51 -0400, you wrote:

>I'm 99% complete with getting mythfrontend setup on a Core i7
>development system, stuck in a closet and connected to my 4K UHD TV.
>
>I'm having to use RF wireless keyboard, mouse, and remote control. Using
>IR is not easily done in the application.
>
>Since I'm using Xubuntu 20.04 I have certain keybindings that are tied
>to XFCE and can't be used by mythfrontend by default.? I have edited
>Settings -> Keyboard to fix most of these.? However, pause/play are not
>configured in those settings, so I don't know where to fix these.
>
>I do know that when I use mythfrontend Edit Keys that I can't change
>pause or play. In fact Edit Keys doesn't even seen them when pressed.
>
>However, when I use the default media app, Parole, the remote pause and
>play do work.
>
>Any idea on where I can remote the keybinding for pause and play so
>mythfrontend can grab them.
>
>Jim A

Whenever I need to find keybindings, I resort to database searches:

MariaDB [mythconverg]> select * from keybindings where
hostname='mypvr' and description like '%pause%';
+-------------+------------+----------------------------------------------------------+---------+----------+
| context | action | description | keylist | hostname |
+-------------+------------+----------------------------------------------------------+---------+----------+
| TV Playback | PAUSE | Pause | P | mypvr |
| TV Playback | FFWDSTICKY | Fast Forward (Sticky) or Forward one second while paused | >,. | mypvr |
| TV Playback | RWNDSTICKY | Rewind (Sticky) or Rewind one second while paused | ,,< | mypvr |
| Music | PAUSE | Pause/Start playback | P | mypvr |
| Weather | PAUSE | Pause current page | P | mypvr |
+-------------+------------+----------------------------------------------------------+---------+----------+
5 rows in set (0.01 sec)

The p key for pause is used in the "TV Playback" and "Music" contexts
- if you change it in one, you probably should change it in both. I
ignore "Weather" as I do not have it installed. Do not forget to also
search the jumppoints table when looking for keybindings:

MariaDB [mythconverg]> select * from jumppoints where hostname='mypvr'
and description like '%pause%';
Empty set (0.00 sec)

I would not have thought there was any problem with XFCE and the p key
though - so I obviously am missing something about how your RF remote
works.
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: mythfrontend keybindings [ In reply to ]
On Mon, May 18, 2020 at 8:42 AM Stephen Worthington <
stephen_agent@jsw.gen.nz> wrote:

> On Mon, 18 May 2020 06:58:51 -0400, you wrote:
>
> >I'm 99% complete with getting mythfrontend setup on a Core i7
> >development system, stuck in a closet and connected to my 4K UHD TV.
> >
> >I'm having to use RF wireless keyboard, mouse, and remote control. Using
> >IR is not easily done in the application.
> >
> >Since I'm using Xubuntu 20.04 I have certain keybindings that are tied
> >to XFCE and can't be used by mythfrontend by default. I have edited
> >Settings -> Keyboard to fix most of these. However, pause/play are not
> >configured in those settings, so I don't know where to fix these.
> >
> >I do know that when I use mythfrontend Edit Keys that I can't change
> >pause or play. In fact Edit Keys doesn't even seen them when pressed.
> >
> >However, when I use the default media app, Parole, the remote pause and
> >play do work.
> >
> >Any idea on where I can remote the keybinding for pause and play so
> >mythfrontend can grab them.
> >
> >Jim A
>
> Whenever I need to find keybindings, I resort to database searches:
>
> MariaDB [mythconverg]> select * from keybindings where
> hostname='mypvr' and description like '%pause%';
>
> +-------------+------------+----------------------------------------------------------+---------+----------+
> | context | action | description
> | keylist | hostname |
>
> +-------------+------------+----------------------------------------------------------+---------+----------+
> | TV Playback | PAUSE | Pause
> | P | mypvr |
> | TV Playback | FFWDSTICKY | Fast Forward (Sticky) or Forward one second
> while paused | >,. | mypvr |
> | TV Playback | RWNDSTICKY | Rewind (Sticky) or Rewind one second while
> paused | ,,< | mypvr |
> | Music | PAUSE | Pause/Start playback
> | P | mypvr |
> | Weather | PAUSE | Pause current page
> | P | mypvr |
>
> +-------------+------------+----------------------------------------------------------+---------+----------+
> 5 rows in set (0.01 sec)
>
> The p key for pause is used in the "TV Playback" and "Music" contexts
> - if you change it in one, you probably should change it in both. I
> ignore "Weather" as I do not have it installed. Do not forget to also
> search the jumppoints table when looking for keybindings:
>
> MariaDB [mythconverg]> select * from jumppoints where hostname='mypvr'
> and description like '%pause%';
> Empty set (0.00 sec)
>
> I would not have thought there was any problem with XFCE and the p key
> though - so I obviously am missing something about how your RF remote
> works.
>
I'm pretty sure my remote's pause/play button is being trapped by the
Desktop environment because I can define another unused remote button to
the TV Playback 'pause' function in Edit Keys and that works.

I could always put stickers on the remote buttons LOL
Re: mythfrontend keybindings [ In reply to ]
On Mon, 18 May 2020 10:29:05 -0400, you wrote:

>I'm pretty sure my remote's pause/play button is being trapped by the
>Desktop environment because I can define another unused remote button to
>the TV Playback 'pause' function in Edit Keys and that works.
>
>I could always put stickers on the remote buttons LOL

If p was being trapped by the desktop, that would be very unusual.
Desktops almost always use Alt- or Ctrl-Alt- keys for hotkeys. And if
you do p on the desktop, you would hope that you would see something
happen as a result. I am still on Xubuntu 18.04 and there in the
Setttings > Window Manager > Keyboard tab I can not see any single
alphabetic keystrokes, and no p key. For the obvious reason that if
you wanted to type p into a field in a program, you really do not want
it grabbed by the desktop before it gets there.

What sort of remote is it? How does it interface with the system?
Does it have any testing software? Is lirc running and grabbing
keystrokes from the remote somehow?
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: mythfrontend keybindings [ In reply to ]
On Mon, May 18, 2020 at 11:44 AM Stephen Worthington <
stephen_agent@jsw.gen.nz> wrote:

>
> If p was being trapped by the desktop, that would be very unusual.
> Desktops almost always use Alt- or Ctrl-Alt- keys for hotkeys. And if
> you do p on the desktop, you would hope that you would see something
> happen as a result. I am still on Xubuntu 18.04 and there in the
> Setttings > Window Manager > Keyboard tab I can not see any single
> alphabetic keystrokes, and no p key. For the obvious reason that if
> you wanted to type p into a field in a program, you really do not want
> it grabbed by the desktop before it gets there.
>
> What sort of remote is it? How does it interface with the system?
> Does it have any testing software? Is lirc running and grabbing
> keystrokes from the remote somehow?
>

The remote is an Air Mouse as shown on the wiki:
https://www.mythtv.org/wiki/Air_mouse_rf_remote
It's RF and connects via USB receiver.
lirc is not installed
Here's what I just did. In Settings -> Keyboard -> Application Shortcuts.
I added a shortcut to run mate-calc if I pressed my remotes >|| button. It
created the short cut noting that the key would be the AudioPlay. However
this didn't work as something else has captured the AudioPlay button.
That's why mythfrontend can't set that button to pause.

Jim A
Re: mythfrontend keybindings [ In reply to ]
On Mon, 18 May 2020 12:05:19 -0400, you wrote:

>On Mon, May 18, 2020 at 11:44 AM Stephen Worthington <
>stephen_agent@jsw.gen.nz> wrote:
>
>>
>> If p was being trapped by the desktop, that would be very unusual.
>> Desktops almost always use Alt- or Ctrl-Alt- keys for hotkeys. And if
>> you do p on the desktop, you would hope that you would see something
>> happen as a result. I am still on Xubuntu 18.04 and there in the
>> Setttings > Window Manager > Keyboard tab I can not see any single
>> alphabetic keystrokes, and no p key. For the obvious reason that if
>> you wanted to type p into a field in a program, you really do not want
>> it grabbed by the desktop before it gets there.
>>
>> What sort of remote is it? How does it interface with the system?
>> Does it have any testing software? Is lirc running and grabbing
>> keystrokes from the remote somehow?
>>
>
>The remote is an Air Mouse as shown on the wiki:
>https://www.mythtv.org/wiki/Air_mouse_rf_remote
>It's RF and connects via USB receiver.
>lirc is not installed
>Here's what I just did. In Settings -> Keyboard -> Application Shortcuts.
>I added a shortcut to run mate-calc if I pressed my remotes >|| button. It
>created the short cut noting that the key would be the AudioPlay. However
>this didn't work as something else has captured the AudioPlay button.
>That's why mythfrontend can't set that button to pause.
>
>Jim A

Ok, it is just a mouse and keyboard as far as the system is concerned.
So you should be able to use it in a terminal session and see what
keystrokes it is producing when you use the pause button. Or install
screenkey:

https://www.omgubuntu.co.uk/2016/11/screenkey-show-key-presses-screen-ubuntu

It should be available as a package:

apt install screenkey

When it is running, screenkey shows the keystrokes as they happen in
an overlay band across the mid-bottom of the screen and makes it easy
to see what each keystroke is.
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: mythfrontend keybindings [ In reply to ]
On Mon, May 18, 2020 at 12:38 PM Stephen Worthington <
stephen_agent@jsw.gen.nz> wrote:

> On Mon, 18 May 2020 12:05:19 -0400, you wrote:
>
> >On Mon, May 18, 2020 at 11:44 AM Stephen Worthington <
> >stephen_agent@jsw.gen.nz> wrote:
> >
> >>
> >> If p was being trapped by the desktop, that would be very unusual.
> >> Desktops almost always use Alt- or Ctrl-Alt- keys for hotkeys. And if
> >> you do p on the desktop, you would hope that you would see something
> >> happen as a result. I am still on Xubuntu 18.04 and there in the
> >> Setttings > Window Manager > Keyboard tab I can not see any single
> >> alphabetic keystrokes, and no p key. For the obvious reason that if
> >> you wanted to type p into a field in a program, you really do not want
> >> it grabbed by the desktop before it gets there.
> >>
> >> What sort of remote is it? How does it interface with the system?
> >> Does it have any testing software? Is lirc running and grabbing
> >> keystrokes from the remote somehow?
> >>
> >
> >The remote is an Air Mouse as shown on the wiki:
> >https://www.mythtv.org/wiki/Air_mouse_rf_remote
> >It's RF and connects via USB receiver.
> >lirc is not installed
> >Here's what I just did. In Settings -> Keyboard -> Application Shortcuts.
> >I added a shortcut to run mate-calc if I pressed my remotes >|| button. It
> >created the short cut noting that the key would be the AudioPlay. However
> >this didn't work as something else has captured the AudioPlay button.
> >That's why mythfrontend can't set that button to pause.
> >
> >Jim A
>
> Ok, it is just a mouse and keyboard as far as the system is concerned.
> So you should be able to use it in a terminal session and see what
> keystrokes it is producing when you use the pause button. Or install
> screenkey:
>
>
> https://www.omgubuntu.co.uk/2016/11/screenkey-show-key-presses-screen-ubuntu
>
> It should be available as a package:
>
> apt install screenkey
>
> When it is running, screenkey shows the keystrokes as they happen in
> an overlay band across the mid-bottom of the screen and makes it easy
> to see what each keystroke is.
>

Screenkey shows XF86AudioPlay when I press my play/pause button
It's the same code that's generated on my keyboard with FN+F8.

Jim A
Re: mythfrontend keybindings [ In reply to ]
On Mon, 18 May 2020 13:11:48 -0400, you wrote:

>On Mon, May 18, 2020 at 12:38 PM Stephen Worthington <
>stephen_agent@jsw.gen.nz> wrote:
>
>> On Mon, 18 May 2020 12:05:19 -0400, you wrote:
>>
>> >On Mon, May 18, 2020 at 11:44 AM Stephen Worthington <
>> >stephen_agent@jsw.gen.nz> wrote:
>> >
>> >>
>> >> If p was being trapped by the desktop, that would be very unusual.
>> >> Desktops almost always use Alt- or Ctrl-Alt- keys for hotkeys. And if
>> >> you do p on the desktop, you would hope that you would see something
>> >> happen as a result. I am still on Xubuntu 18.04 and there in the
>> >> Setttings > Window Manager > Keyboard tab I can not see any single
>> >> alphabetic keystrokes, and no p key. For the obvious reason that if
>> >> you wanted to type p into a field in a program, you really do not want
>> >> it grabbed by the desktop before it gets there.
>> >>
>> >> What sort of remote is it? How does it interface with the system?
>> >> Does it have any testing software? Is lirc running and grabbing
>> >> keystrokes from the remote somehow?
>> >>
>> >
>> >The remote is an Air Mouse as shown on the wiki:
>> >https://www.mythtv.org/wiki/Air_mouse_rf_remote
>> >It's RF and connects via USB receiver.
>> >lirc is not installed
>> >Here's what I just did. In Settings -> Keyboard -> Application Shortcuts.
>> >I added a shortcut to run mate-calc if I pressed my remotes >|| button. It
>> >created the short cut noting that the key would be the AudioPlay. However
>> >this didn't work as something else has captured the AudioPlay button.
>> >That's why mythfrontend can't set that button to pause.
>> >
>> >Jim A
>>
>> Ok, it is just a mouse and keyboard as far as the system is concerned.
>> So you should be able to use it in a terminal session and see what
>> keystrokes it is producing when you use the pause button. Or install
>> screenkey:
>>
>>
>> https://www.omgubuntu.co.uk/2016/11/screenkey-show-key-presses-screen-ubuntu
>>
>> It should be available as a package:
>>
>> apt install screenkey
>>
>> When it is running, screenkey shows the keystrokes as they happen in
>> an overlay band across the mid-bottom of the screen and makes it easy
>> to see what each keystroke is.
>>
>
>Screenkey shows XF86AudioPlay when I press my play/pause button
>It's the same code that's generated on my keyboard with FN+F8.

That makes sense. I seem to remember that mythfrontend does not
handle Fn-Fx keys. Maybe they are encoded as more than one byte? Is
there any way to change what keystroke the remote sends? It may also
be possible to remap it at the kernel keyboard code level. A quick
search gave me this page:

https://wiki.archlinux.org/index.php/Map_scancodes_to_keycodes
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: mythfrontend keybindings [ In reply to ]
On 5/18/20 6:58 AM, Jim Abernathy wrote:
> I'm 99% complete with getting mythfrontend setup on a Core i7
> development system, stuck in a closet and connected to my 4K UHD TV.
>
> I'm having to use RF wireless keyboard, mouse, and remote control.
> Using IR is not easily done in the application.
>
> Since I'm using Xubuntu 20.04 I have certain keybindings that are tied
> to XFCE and can't be used by mythfrontend by default.  I have edited
> Settings -> Keyboard to fix most of these.  However, pause/play are
> not configured in those settings, so I don't know where to fix these.
>
> I do know that when I use mythfrontend Edit Keys that I can't change
> pause or play. In fact Edit Keys doesn't even seen them when pressed.
>
> However, when I use the default media app, Parole, the remote pause
> and play do work.
>
> Any idea on where I can remote the keybinding for pause and play so
> mythfrontend can grab them.
>
> Jim A
>
>
>
What you really need to do is disable the mechanism that grabs
multimedia keys before they get to the application. Then the edit keys
will see them. Each version of Ubuntu has its own method of doing that:

Ubuntu (this may be out of date):

use dconf-editor org.gnome.settings-daemon.plugins.media-keys and remove
the
actions from keys (next, pause, play, previous, stop)

In Xubuntu:

in the panel preferences find the pulseaudio plugin(volume control),
Right Click, Properties, media players. Disable "Control playback of
media players".

Peter


_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: mythfrontend keybindings [ In reply to ]
On Mon, May 18, 2020 at 2:44 PM Peter Bennett <pb.mythtv@gmail.com> wrote:

>
> On 5/18/20 6:58 AM, Jim Abernathy wrote:
> > I'm 99% complete with getting mythfrontend setup on a Core i7
> > development system, stuck in a closet and connected to my 4K UHD TV.
> >
> > I'm having to use RF wireless keyboard, mouse, and remote control.
> > Using IR is not easily done in the application.
> >
> > Since I'm using Xubuntu 20.04 I have certain keybindings that are tied
> > to XFCE and can't be used by mythfrontend by default. I have edited
> > Settings -> Keyboard to fix most of these. However, pause/play are
> > not configured in those settings, so I don't know where to fix these.
> >
> > I do know that when I use mythfrontend Edit Keys that I can't change
> > pause or play. In fact Edit Keys doesn't even seen them when pressed.
> >
> > However, when I use the default media app, Parole, the remote pause
> > and play do work.
> >
> > Any idea on where I can remote the keybinding for pause and play so
> > mythfrontend can grab them.
> >
> > Jim A
> >
> >
> >
> What you really need to do is disable the mechanism that grabs
> multimedia keys before they get to the application. Then the edit keys
> will see them. Each version of Ubuntu has its own method of doing that:
>
> Ubuntu (this may be out of date):
>
> use dconf-editor org.gnome.settings-daemon.plugins.media-keys and remove
> the
> actions from keys (next, pause, play, previous, stop)
>
> In Xubuntu:
>
> in the panel preferences find the pulseaudio plugin(volume control),
> Right Click, Properties, media players. Disable "Control playback of
> media players".
>
> Peter
>

WE HAVE A WINNER!

It was right where you said on Xubuntu. Didn't even have to reboot.

Thanks,
Jim A
Re: mythfrontend keybindings [ In reply to ]
On 5/18/2020 6:58 AM, Jim Abernathy wrote:
> I'm 99% complete with getting mythfrontend setup on a Core i7 development system, stuck in a closet and connected to my 4K UHD TV.
>
> I'm having to use RF wireless keyboard, mouse, and remote control. Using IR is not easily done in the application.
>
> Since I'm using Xubuntu 20.04 I have certain keybindings that are tied to XFCE and can't be used by mythfrontend by default.  I have edited Settings -> Keyboard to fix most of these.  However, pause/play are not configured in those settings, so I don't know where to fix these.
>
> I do know that when I use mythfrontend Edit Keys that I can't change pause or play. In fact Edit Keys doesn't even seen them when pressed.
>
> However, when I use the default media app, Parole, the remote pause and play do work.
>
> Any idea on where I can remote the keybinding for pause and play so mythfrontend can grab them.
>
> Jim A

If you want to double check if the desktop environment is trapping those keys, try using "xev". It's an X application that prints out the keys is sees as you press them, including shift like keys (e.g. Ctrl, Alt, etc). If the desktop is not trapping the play/pause key, pressing it should show up as XF86AudioPlay. But that's not what you would put in your keybindings table. It has to be what Qt calls the play/pause key, which is "Media Play". You can find what Qt calls other media keys in the source file:
https://code.qt.io/cgit/qt/qtbase.git/tree/src/gui/kernel/qkeysequence.cpp
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org