Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: MythTV: Dev

[PLUGIN] Key binding editor (MythControls)

 

 

MythTV dev RSS feed   Index | Next | Previous | View Threaded


mfgalizi at uwo

May 4, 2005, 12:46 PM

Post #1 of 20 (12977 views)
Permalink
[PLUGIN] Key binding editor (MythControls)

Hello all,

I've written a little plugin that allows key bindings to be configured
on the frontend (instead of using mythweb or sql). I would like it to
be included with the plugins package, so if someone with that kind of
authority can have a look, it would be much appreciated. Instructions
on building/installing are in the README.

Cheers!
--
Micah Galizia
mfgalizi [at] uwo

"The mark of an immature man is that he wants to die nobly for a cause,
while the mark of the mature man is that he wants to live humbly for
one." --W. Stekel
Attachments: mythcontrols.tar.gz (14.2 KB)
  signature.asc (0.18 KB)


jdonavan at jdonavan

May 4, 2005, 3:12 PM

Post #2 of 20 (12881 views)
Permalink
Re: [PLUGIN] Key binding editor (MythControls) [In reply to]

Micah F. Galizia wrote:

>Hello all,
>
>I've written a little plugin that allows key bindings to be configured
>on the frontend (instead of using mythweb or sql). I would like it to
>be included with the plugins package, so if someone with that kind of
>authority can have a look, it would be much appreciated. Instructions
>on building/installing are in the README.
>
>

Any reason why you decided to implement this as a plugin instead of
putting in in the frontend itself? Also, the keypress handler doesn't
deal with meta keys like Ctrl+P for example. Other than that, it's a
great idea.

_______________________________________________
mythtv-dev mailing list
mythtv-dev [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev


jdonavan at jdonavan

May 4, 2005, 3:13 PM

Post #3 of 20 (12877 views)
Permalink
Re: [PLUGIN] Key binding editor (MythControls) [In reply to]

Micah F. Galizia wrote:

>Hello all,
>
>I've written a little plugin that allows key bindings to be configured
>on the frontend (instead of using mythweb or sql). I would like it to
>be included with the plugins package, so if someone with that kind of
>authority can have a look, it would be much appreciated. Instructions
>on building/installing are in the README.
>
>

Oh one more thing, you're spamming "managedtree::draw" to the console. ;)
_______________________________________________
mythtv-dev mailing list
mythtv-dev [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev


mfgalizi at uwo

May 4, 2005, 3:22 PM

Post #4 of 20 (12845 views)
Permalink
Re: [PLUGIN] Key binding editor (MythControls) [In reply to]

On Wed, 2005-04-05 at 18:12 -0400, J. Donavan Stanley wrote:
> Micah F. Galizia wrote:
>
> >Hello all,
> >
> >I've written a little plugin that allows key bindings to be configured
> >on the frontend (instead of using mythweb or sql). I would like it to
> >be included with the plugins package, so if someone with that kind of
> >authority can have a look, it would be much appreciated. Instructions
> >on building/installing are in the README.
> >
> >
>
> Any reason why you decided to implement this as a plugin instead of
> putting in in the frontend itself? Also, the keypress handler doesn't
> deal with meta keys like Ctrl+P for example. Other than that, it's a
> great idea.

Easily enough, this could be put in the frontend. Not my call.
However, as a plugin, it is much less complicated to integrate. Good
call on the modifiers. Will look into it.
--
Micah F. Galizia
mfgalizi [at] uwo

"The mark of an immature man is that he wants to die
nobly for a cause, while the mark of the mature man is
that he wants to live humbly for one." --W. Stekel
Attachments: signature.asc (0.18 KB)


bjm at lvcm

May 4, 2005, 4:44 PM

Post #5 of 20 (12886 views)
Permalink
Re: [PLUGIN] Key binding editor (MythControls) [In reply to]

Micah F. Galizia wrote:
> On Wed, 2005-04-05 at 18:12 -0400, J. Donavan Stanley wrote:
>
>>Micah F. Galizia wrote:
>>
>>
>>>Hello all,
>>>
>>>I've written a little plugin that allows key bindings to be configured
>>>on the frontend (instead of using mythweb or sql). I would like it to
>>>be included with the plugins package, so if someone with that kind of
>>>authority can have a look, it would be much appreciated. Instructions
>>>on building/installing are in the README.
>>>
>>>
>>
>>Any reason why you decided to implement this as a plugin instead of
>>putting in in the frontend itself? Also, the keypress handler doesn't
>>deal with meta keys like Ctrl+P for example. Other than that, it's a
>>great idea.
>
>
> Easily enough, this could be put in the frontend. Not my call.

I've always assumed that the reason for the mythweb interface
was to avoid a catch 22 where you could screw up your keys to a
point where you could not fix it through a frontend interface.
You may want to consider maybe having a 'safe' key bindings command
line flag or something to get out of situations like that.

I actually like the idea of this being a module. One way or the
other it will be a different menu item for the user to select
and having a module makes it optional.

Donavan, while you are looking at way to simplify the user options,
maybe it might be worth considering having an Advanced Options
module so that the pages and pages of the more arcane options
don't need to be in the binaries at all but are still accessible
by installing the module.

> However, as a plugin, it is much less complicated to integrate. Good
> call on the modifiers. Will look into it.

The fist thing I noticed is that your bindings may still be returned
by the database in a logical order but I've done many bad things to
my test system and the query result order was nearly random. For
example, I had four "Global"s in the left column where three of
them had one or two items. An ORDER BY fixed it right up =).

-- bjm
Attachments: keybindings.diff (0.45 KB)


mfgalizi at uwo

May 4, 2005, 5:01 PM

Post #6 of 20 (12902 views)
Permalink
Re: [PLUGIN] Key binding editor (MythControls) [In reply to]

On Wed, 2005-04-05 at 16:44 -0700, Bruce Markey wrote:
> Micah F. Galizia wrote:
> > On Wed, 2005-04-05 at 18:12 -0400, J. Donavan Stanley wrote:
> >
> >>Micah F. Galizia wrote:
> >>
> >>
> >>>Hello all,
> >>>
> >>>I've written a little plugin that allows key bindings to be configured
> >>>on the frontend (instead of using mythweb or sql). I would like it to
> >>>be included with the plugins package, so if someone with that kind of
> >>>authority can have a look, it would be much appreciated. Instructions
> >>>on building/installing are in the README.
> >>>
> >>>
> >>
> >>Any reason why you decided to implement this as a plugin instead of
> >>putting in in the frontend itself? Also, the keypress handler doesn't
> >>deal with meta keys like Ctrl+P for example. Other than that, it's a
> >>great idea.
> >
> >
> > Easily enough, this could be put in the frontend. Not my call.
>
> I've always assumed that the reason for the mythweb interface
> was to avoid a catch 22 where you could screw up your keys to a
> point where you could not fix it through a frontend interface.
> You may want to consider maybe having a 'safe' key bindings command
> line flag or something to get out of situations like that.

I am going to add code (later) to check for key conflicts and illogical
bindings (directions, escape and select). However, lets think about
that "catch 22" for a second from a human-computer interaction point of
view.

1) Can I see a show of hands from the "average" user that runs a web
server? Now, a show of hands from those that want a (potentially) cheap
"tivo"?

2) Setting up myth is hard enough, much less a secure web server.

What I'm trying to say is that myth's usability is terrible, and you
have to be pretty hardcore just to get it working. I say better this
than nothing (or mythweb wrt setting up a remote control), but thats my
two cents -- no need for anyone to take it personally.

> I actually like the idea of this being a module. One way or the
> other it will be a different menu item for the user to select
> and having a module makes it optional.
>
> Donavan, while you are looking at way to simplify the user options,
> maybe it might be worth considering having an Advanced Options
> module so that the pages and pages of the more arcane options
> don't need to be in the binaries at all but are still accessible
> by installing the module.
>
> > However, as a plugin, it is much less complicated to integrate. Good
> > call on the modifiers. Will look into it.
>
> The fist thing I noticed is that your bindings may still be returned
> by the database in a logical order but I've done many bad things to
> my test system and the query result order was nearly random. For
> example, I had four "Global"s in the left column where three of
> them had one or two items. An ORDER BY fixed it right up =).

I'm picking up the vibe your laying down ;) That is a really good idea.
--
Micah F. Galizia
mfgalizi [at] uwo

"The mark of an immature man is that he wants to die
nobly for a cause, while the mark of the mature man is
that he wants to live humbly for one." --W. Stekel
Attachments: signature.asc (0.18 KB)


mfgalizi at uwo

May 4, 2005, 5:47 PM

Post #7 of 20 (12879 views)
Permalink
Re: [PLUGIN] Key binding editor (MythControls) [In reply to]

On Wed, 2005-04-05 at 18:12 -0400, J. Donavan Stanley wrote:
> Micah F. Galizia wrote:
>
> >Hello all,
> >
> >I've written a little plugin that allows key bindings to be configured
> >on the frontend (instead of using mythweb or sql). I would like it to
> >be included with the plugins package, so if someone with that kind of
> >authority can have a look, it would be much appreciated. Instructions
> >on building/installing are in the README.
> >
> >
>
> Any reason why you decided to implement this as a plugin instead of
> putting in in the frontend itself? Also, the keypress handler doesn't
> deal with meta keys like Ctrl+P for example. Other than that, it's a
> great idea.

OK, I have attached a version that captures key combinations (Ctrl+P),
but myth doesn't seem to respond to the combinations. Anyone have any
thoughts? I'm manually adding the modifiers to the key, so maybe they
are just wrong, but I cannot find the symbolic names myth uses anywhere
in the code.

This version also orders the contexts as Bruce suggested.

Cheers!
--
Micah F. Galizia
mfgalizi [at] uwo

"The mark of an immature man is that he wants to die
nobly for a cause, while the mark of the mature man is
that he wants to live humbly for one." --W. Stekel
Attachments: mythcontrols_2.tar.gz (14.4 KB)
  signature.asc (0.18 KB)


myth at eskil

May 4, 2005, 6:44 PM

Post #8 of 20 (12886 views)
Permalink
Re: [PLUGIN] Key binding editor (MythControls) [In reply to]

On Wed, 2005-05-04 at 18:13 -0400, J. Donavan Stanley wrote:

> >I've written a little plugin that allows key bindings to be configured\
> Oh one more thing, you're spamming "managedtree::draw" to the console. ;)

Actually, that's my lcd patch that does that (just noticed it), sorry
about that done. I'll make a patch that fixes that.

eskil
---


mark at dclabs

May 4, 2005, 6:58 PM

Post #9 of 20 (12875 views)
Permalink
Re: [PLUGIN] Key binding editor (MythControls) [In reply to]

> > Oh one more thing, you're spamming "managedtree::draw" to the console.
;)
>
> Actually, that's my lcd patch that does that (just noticed it), sorry
> about that done. I'll make a patch that fixes that.

also the cerr above should be converted to VERBOSE

mark

_______________________________________________
mythtv-dev mailing list
mythtv-dev [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev


csmillie at gmail

May 4, 2005, 9:49 PM

Post #10 of 20 (12839 views)
Permalink
Re: [PLUGIN] Key binding editor (MythControls) [In reply to]

On 5/4/05, Micah F. Galizia <mfgalizi [at] uwo> wrote:
> I've written a little plugin that allows key bindings to be configured
> on the frontend (instead of using mythweb or sql). I would like it to
> be included with the plugins package, so if someone with that kind of
> authority can have a look, it would be much appreciated. Instructions
> on building/installing are in the README.

I think this is a great idea, any plans to add support for lircrc
configuration too? In terms of usability I think it would be great to
have...

Colin
_______________________________________________
mythtv-dev mailing list
mythtv-dev [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev


myth at eskil

May 4, 2005, 10:32 PM

Post #11 of 20 (12832 views)
Permalink
Re: [PLUGIN] Key binding editor (MythControls) [In reply to]

On Thu, 2005-05-05 at 11:58 +1000, Mark Spieth wrote:

> > Actually, that's my lcd patch that does that (just noticed it), sorry
> > about that done. I'll make a patch that fixes that.
>
> also the cerr above should be converted to VERBOSE

Which cerr ?

eskil
---


jdonavan at jdonavan

May 5, 2005, 5:13 AM

Post #12 of 20 (12852 views)
Permalink
Re: [PLUGIN] Key binding editor (MythControls) [In reply to]

Bruce Markey wrote:

> Donavan, while you are looking at way to simplify the user options,
> maybe it might be worth considering having an Advanced Options
> module so that the pages and pages of the more arcane options
> don't need to be in the binaries at all but are still accessible
> by installing the module.


Ideally I'd like to introduce the concept of a "user experience level"
much like Xine has so that every setting has an associated level with it
and settings higher than the current users experience level don't get
shown. The only problem with that is we'd end up with some screens only
having one or two items in them, so it needs to be done as part of the
settings UI rewrite for MythUI.
_______________________________________________
mythtv-dev mailing list
mythtv-dev [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev


mfgalizi at uwo

May 5, 2005, 5:19 AM

Post #13 of 20 (12836 views)
Permalink
Re: [PLUGIN] Key binding editor (MythControls) [In reply to]

On Thu, 2005-05-05 at 00:49 -0400, Colin Smillie wrote:
> On 5/4/05, Micah F. Galizia <mfgalizi [at] uwo> wrote:
> > I've written a little plugin that allows key bindings to be configured
> > on the frontend (instead of using mythweb or sql). I would like it to
> > be included with the plugins package, so if someone with that kind of
> > authority can have a look, it would be much appreciated. Instructions
> > on building/installing are in the README.
>
> I think this is a great idea, any plans to add support for lircrc
> configuration too? In terms of usability I think it would be great to
> have...

I plan to do alot of things, but this is not yet one. Personally, I'm
not keen on lirc, and I would rather see proper remote control support
(evdev/ir-kdb) in QT/Myth. Then, there would be no need for LIRC.
--
Micah F. Galizia
mfgalizi [at] uwo

"The mark of an immature man is that he wants to die
nobly for a cause, while the mark of the mature man is
that he wants to live humbly for one." --W. Stekel
Attachments: signature.asc (0.18 KB)


jdonavan at jdonavan

May 5, 2005, 5:30 AM

Post #14 of 20 (12829 views)
Permalink
Re: [PLUGIN] Key binding editor (MythControls) [In reply to]

Micah F. Galizia wrote:

>I plan to do alot of things, but this is not yet one. Personally, I'm
>not keen on lirc, and I would rather see proper remote control support
>(evdev/ir-kdb) in QT/Myth. Then, there would be no need for LIRC.
>
>

Except then every single app you wanted to use would need "proper remote
control support" which is problematic at best.
_______________________________________________
mythtv-dev mailing list
mythtv-dev [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev


mfgalizi at uwo

May 5, 2005, 6:07 AM

Post #15 of 20 (12831 views)
Permalink
Re: [PLUGIN] Key binding editor (MythControls) [In reply to]

On Thu, 2005-05-05 at 08:30 -0400, J. Donavan Stanley wrote:
> Micah F. Galizia wrote:
>
> >I plan to do alot of things, but this is not yet one. Personally, I'm
> >not keen on lirc, and I would rather see proper remote control support
> >(evdev/ir-kdb) in QT/Myth. Then, there would be no need for LIRC.
> >
> >
>
> Except then every single app you wanted to use would need "proper remote
> control support" which is problematic at best.

That sounds like an excuse to me! Correct me if I am wrong, but to use
LIRC, every single app you want to use already has to have added support
for the LIRC client libraries. If they can support LIRC, then why not
the Linux input layer?

Let me reiterate: I'm not saying we shouldn't add settings for LIRC, I
just think we shouldn't need to. Furthermore, LIRC is just one more
program that the user has to set up, and it is not trivial.

This debate could go on forever, so I will (try to) end it here and
agree that someday, we will add LIRC support because MythTV has LIRC
support. This assumes however, that the plugin is actually added.

Have a nice day!
--
Micah F. Galizia
mfgalizi [at] uwo

"The mark of an immature man is that he wants to die
nobly for a cause, while the mark of the mature man is
that he wants to live humbly for one." --W. Stekel
Attachments: signature.asc (0.18 KB)


mfgalizi at uwo

May 5, 2005, 6:19 AM

Post #16 of 20 (12862 views)
Permalink
Re: [PLUGIN] Key binding editor (MythControls) [In reply to]

On Thu, 2005-05-05 at 08:13 -0400, J. Donavan Stanley wrote:
> Bruce Markey wrote:
>
> > Donavan, while you are looking at way to simplify the user options,
> > maybe it might be worth considering having an Advanced Options
> > module so that the pages and pages of the more arcane options
> > don't need to be in the binaries at all but are still accessible
> > by installing the module.
>
>
> Ideally I'd like to introduce the concept of a "user experience level"
> much like Xine has so that every setting has an associated level with it
> and settings higher than the current users experience level don't get
> shown. The only problem with that is we'd end up with some screens only
> having one or two items in them, so it needs to be done as part of the
> settings UI rewrite for MythUI.

When/where is this rewrite discussion taking place?
--
Micah F. Galizia
mfgalizi [at] uwo

"The mark of an immature man is that he wants to die
nobly for a cause, while the mark of the mature man is
that he wants to live humbly for one." --W. Stekel
Attachments: signature.asc (0.18 KB)


jdonavan at jdonavan

May 5, 2005, 6:38 AM

Post #17 of 20 (12837 views)
Permalink
Re: [PLUGIN] Key binding editor (MythControls) [In reply to]

Micah F. Galizia wrote:

>On Thu, 2005-05-05 at 08:13 -0400, J. Donavan Stanley wrote:
>
>
>>Bruce Markey wrote:
>>
>>
>>
>>>Donavan, while you are looking at way to simplify the user options,
>>>maybe it might be worth considering having an Advanced Options
>>>module so that the pages and pages of the more arcane options
>>>don't need to be in the binaries at all but are still accessible
>>>by installing the module.
>>>
>>>
>>Ideally I'd like to introduce the concept of a "user experience level"
>>much like Xine has so that every setting has an associated level with it
>>and settings higher than the current users experience level don't get
>>shown. The only problem with that is we'd end up with some screens only
>>having one or two items in them, so it needs to be done as part of the
>>settings UI rewrite for MythUI.
>>
>>
>
>When/where is this rewrite discussion taking place?
>
>

It's been spread out over a variety of places, mostly irc if I remember
correctly. What it boils down to is this: MythUI will do away with Qt
based controls, when that happens the settings code will have to be
rewritten in such a way as to not need Qt based controls. That task
falls on my shoulders, and in the process of taking care of that I'd
like to correct a few other issues.
_______________________________________________
mythtv-dev mailing list
mythtv-dev [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev


jdonavan at jdonavan

May 5, 2005, 6:41 AM

Post #18 of 20 (12873 views)
Permalink
Re: [PLUGIN] Key binding editor (MythControls) [In reply to]

Micah F. Galizia wrote:

>That sounds like an excuse to me! Correct me if I am wrong, but to use
>LIRC, every single app you want to use already has to have added support
>for the LIRC client libraries. If they can support LIRC, then why not
>the Linux input layer?
>
>

You are wrong. ;)

The path of least resistance for using remotes is to use the irxevent
application that's included with lirc. This allows ANY application
(that accepts X events for input) to receive remote input as though it
had been entered with a keyboard. This allows for all kinds of
applications to be used without hassle.


_______________________________________________
mythtv-dev mailing list
mythtv-dev [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev


mfgalizi at uwo

May 5, 2005, 6:57 AM

Post #19 of 20 (12834 views)
Permalink
Re: [PLUGIN] Key binding editor (MythControls) [In reply to]

On Thu, 2005-05-05 at 09:41 -0400, J. Donavan Stanley wrote:
> Micah F. Galizia wrote:
>
> >That sounds like an excuse to me! Correct me if I am wrong, but to use
> >LIRC, every single app you want to use already has to have added support
> >for the LIRC client libraries. If they can support LIRC, then why not
> >the Linux input layer?
> >
> >
>
> You are wrong. ;)
>
> The path of least resistance for using remotes is to use the irxevent
> application that's included with lirc. This allows ANY application
> (that accepts X events for input) to receive remote input as though it
> had been entered with a keyboard. This allows for all kinds of
> applications to be used without hassle.

OK, fine. But I still think that the Linux input layer is better. Its
already there, it works well with any remote I have ever owned, and it
works without X.
--
Micah F. Galizia
mfgalizi [at] uwo

"The mark of an immature man is that he wants to die
nobly for a cause, while the mark of the mature man is
that he wants to live humbly for one." --W. Stekel
Attachments: signature.asc (0.18 KB)


mtdean at thirdcontact

May 5, 2005, 9:18 AM

Post #20 of 20 (12889 views)
Permalink
Re: [PLUGIN] Key binding editor (MythControls) [In reply to]

Micah F. Galizia wrote:

>On Thu, 2005-05-05 at 09:41 -0400, J. Donavan Stanley wrote:
>
>
>>Micah F. Galizia wrote:
>>
>>>That sounds like an excuse to me! Correct me if I am wrong, but to use
>>>LIRC, every single app you want to use already has to have added support
>>>for the LIRC client libraries. If they can support LIRC, then why not
>>>the Linux input layer?
>>>
>>>
>>You are wrong. ;)
>>
>>The path of least resistance for using remotes is to use the irxevent
>>application that's included with lirc. This allows ANY application
>>(that accepts X events for input) to receive remote input as though it
>>had been entered with a keyboard. This allows for all kinds of
>>applications to be used without hassle.
>>
>OK, fine. But I still think that the Linux input layer is better. Its
>already there, it works well with any remote I have ever owned, and it
>works without X.
>
>
Then, instead of configuring my remote for all programs in one file
(~/.lircrc, to which ~/.mythtv/lircrc is linked), I can change
keybindings in MythTV to fit my remote using MythWeb or your keybinding
editor; I can change xine keybindings using ~/.xine/keymap; I can change
MPlayer keybindings using ~/.mplayer/input.conf; and I can change my
window manager's and all my other applications's keybindings using their
configuration files (or--shudder at the thought--GUI configuration wizards).

And I only have to make sure that the keys issued by my remote make
sense for all the applications. For example, my Play and Pause buttons
issue a 'P' in MythTV--I use them both as play toggles; but in xine,
Play and Pause are not toggles--they're two distinct commands--so I need
two different keys for them (which is impossible to do both ways with a
keyboard--but not with LIRC) so I have to change my MythTV setup...
And, since I can't rely on the application-specific default keybindings,
I have to change the keybindings for all my apps, so all the time I've
invested in learning the default keybindings for xine, MPlayer, etc was
wasted; and once I learn the new bindings, I either have to ensure all
my computers have the same keybindings specified (to make it possible to
use the apps on other non-Myth computers without remotes) or remember
when to use which set of keybindings--and I'm out of luck when using
someone else's computer.

So, there are good reasons for using LIRC. As a matter of fact, I use
an ATI Remote Wonder, but I configured it with LIRC (the much-harder
way) instead of as a keyboard for exactly these reasons. IMHO, LIRC
allows remote control configuration to be much more flexible--for those
of us willing to learn to use it.

Mike
_______________________________________________
mythtv-dev mailing list
mythtv-dev [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev

MythTV dev RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.