[Linuxtrent] Re: telecomando e linux: help

  • From: Emanuele Olivetti <emanuele@xxxxxxxxxxxxxx>
  • To: linuxtrent@xxxxxxxxxxxxx
  • Date: Fri, 01 Jan 2010 16:05:11 +0100

Roberto Resoli wrote:
...
Innanzi tutto grazie a tutti per le risposte e Buon Anno!

 In effetti non vorrei modificare il comportamento del
 telecomando "come tastiera", con xmodmap. Il computer in
 questione ha collegata anche una tastiera vera e non vorrei
 che le modifiche influenzino pure quest'ultima.

non vedo come. Tu vai a modificare il comportamento di tasti del
telecomando cui non corrisponde la funzione voluta

 Non sarebbe simpatico premere INVIO e ottenere un carattere
 SPAZIO quando la uso.

mica intercetti invio ovviamente. casomai associ il keycode del tasto
play per farlo corrispondere alla  P.


Ah! Questo non l'avevo capito. Allora e' sufficiente che
gli stessi keycode del telecomando non siano anche generati
da altri dispositivi di input.

Sto guardando con xev quali sono i keycode dei vari tasti
perche' .xmodmap vuole un file di questo tipo:
-----
...

keycode <valore_keycode> = <Funzione>

...
-----
Pero' l'output di xev mi perplime... Se premo il tasto "play" sul telecomando
ottengo:
----
KeyPress event, serial 30, synthetic NO, window 0x4a00001,
   root 0x5a, subw 0x0, time 67923444, (297,87), root:(302,136),
   state 0x0, keycode 36 (keysym 0xff0d, Return), same_screen YES,
"   XLookupString gives 1 bytes: (0d) "
"   XmbLookupString gives 1 bytes: (0d) "
   XFilterEvent returns: False

KeyRelease event, serial 30, synthetic NO, window 0x4a00001,
   root 0x5a, subw 0x0, time 67923452, (297,87), root:(302,136),
   state 0x0, keycode 36 (keysym 0xff0d, Return), same_screen YES,
"   XLookupString gives 1 bytes: (0d) "
   XFilterEvent returns: False
-----
(Un evento per la pressione e uno per il rilascio). Il keycode e' 36.
Se premo l'invio sulla tastiera ottengo:
-----
KeyPress event, serial 30, synthetic NO, window 0x4a00001,
   root 0x5a, subw 0x0, time 67928476, (297,87), root:(302,136),
   state 0x0, keycode 36 (keysym 0xff0d, Return), same_screen YES,
"   XLookupString gives 1 bytes: (0d) "
"   XmbLookupString gives 1 bytes: (0d) "
   XFilterEvent returns: False

KeyRelease event, serial 30, synthetic NO, window 0x4a00001,
   root 0x5a, subw 0x0, time 67928557, (297,87), root:(302,136),
   state 0x0, keycode 36 (keysym 0xff0d, Return), same_screen YES,
"   XLookupString gives 1 bytes: (0d) "
   XFilterEvent returns: False
-----
Anche qui pero' ottengo "keycode 36".
Se specifico in .xmodmap che il keycode 36 debba essere rimappato in
qualcos'altro, non rischio di comprendere anche la tastiera?

Mi sa che mi sfugge ancora qualcosa...

E.


--
Per iscriversi  (o disiscriversi), basta spedire un  messaggio con OGGETTO
"subscribe" (o "unsubscribe") a mailto:linuxtrent-request@xxxxxxxxxxxxx


Other related posts: