Michael Walma said the following, on 10.03.2008 00:54:
> On Sunday 09 March 2008 17:37:35 Duncan Webb wrote:
>   
>> Duncan Webb wrote:
>>     
>>> Michael Walma wrote:
>>>       
>>>> Hello,
>>>>
>>>> As a first time poster, let me begin by thanking the developers of
>>>> Freevo for a great program!
>>>>
>>>> I'm using Freevo 1.7.3 and I am having some difficulty remapping keys.
>>>> I am using an odd-ball USB remote (Keyspan), which appears to X, and so
>>>> to Freevo as a keyboard.  My problem is that the remote does not have
>>>> either an 'e' or an 'enter' key, so I can't enter the Audio CD Backup
>>>> sub-menu using the remote.  The remote will generate an asterisk and I
>>>> would have thought that something like:
>>>>
>>>> KEYMAP[key.K_ASTERISK] = 'ENTER'
>>>>
>>>> would work, but it doesn't seem to.  Any pointers on how to solve my
>>>> problem would be great.  A pointer to a document which explains event
>>>> and key mapping in detail would be even better.  For example, I can't
>>>> find a list of all events anywhere.
>>>>         
>  >
>   
>>> EVENTS['menu']['K_F5']  = Event(OSD_MESSAGE, arg='K_F5')
>>> KEYMAP[key.K_F5] = 'K_F5'
>>>       
>> I should have said a bit more:
>>
>> KEYMAP only works for keyboard events, not for lirc events.
>>
>>     
>>> Any way try using lircrc to map the asterisk to ENTER
>>>       
>> This is what you need to do, change lircrc to map asterisk to ENTER.
>>
>> Duncan
>>     
>
> Thanks for this, but I need to be clear.  My remote does not work under lirc. 
>  
> It is an odd-ball (Keyspan Remote) which appears as a keyboard (albeit with a 
> very limited number of keys) under X, using the evdev driver in xorg.  Here 
> is a link to a description:
>
> http://www.keyspan.com/products/urm15A/
>
> I have had no trouble using it with Freevo, using xmodmap to make sure all 
> the 
> strange key strokes convert to the usual ones Freevo expects.
>   

There is a evdev in freevo too, have you tried this?

Something like this needs to be added to local_conf.py
EVENT_DEVS = ['AT Translated Set 2 keyboard', 'i2c IR (Hauppauge)']

The names are taken from lsinput.

> So, really what I am asking is how to remap keyboard keys.  How can I make an 
> asterisk key stroke cause the Audio CD Backup menu get entered in the same 
> way that typing 'e' or 'enter' would since this 'keyboard' has neither an 'e' 
> nor an 'enter' key.
>
> I could use xmodmap to cause an asterisk key stroke to get mapped to 'e', but 
> that would mean even my real keyboard would no longer be able to generate 
> an 'e' since xmodmap works against all input devices and for all X programs 
> for the duration of the session, which is not ideal.
>
> By the way, is there somewhere out there a list of all possible variations 
> of 'Event' and 'EVENTS'?  I looked in events.py, but I'm not a python guy.
>   
Add this to the bottom of local_conf.py:
print_events = True
if print_events:
    # Print configured events
    for(k, v) in EVENTS.items():
        print '==========='
        print '%s' % (k)
        print '-----------'
        for (k2, v2) in v.items():
            if v2.handler != None:
                print '  "%s" %s "%s" %s:%s' % (k2, v2.name, v2.arg,
v2.context, v2.handler)
            elif v2.context != None:
                print '  "%s" %s "%s" %s' % (k2, v2.name, v2.arg,
v2.context)
            elif v2.arg != None:
                print '  "%s" %s "%s"' % (k2, v2.name, v2.arg)
            else:
                print '  "%s" %s' % (k2, v2.name)


HTH
Duncan

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Freevo-users mailing list
Freevo-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freevo-users

Reply via email to