------------------------------------------------------------------------------------- ENGLISH: --------- New eventmap support for Lirc (incomplete actually). By Lucian Langa <cooly@eweb.ro> Thanks for his work. Question: What's eventmap? ------------------------------------------------------------------------------------- Eventmap is a new config mechanism to map input events (lirc, joystick, keyboard) into xdtv commands which is called "eventmap". Actually it only work with the xdtv lirc support. Question: How to activate it? ------------------------------------------------------------------------------------- If there is no ~/.lircrc config file, xdtv will automatically (with an offset) generate lirc-key-* events for every key pressed on the IR remote. If ~/.lircrc is present, xdtv will still use it. As strings for "config" are the usual xdtv commands (the traditional way to configure lirc support), specifying "eventmap" will make xdtv simply generate lirc-key-* events. The main difference between using no config file at all and one with "config = eventmap" is that the later allows you to filter the keypresses depending on the current mode. The simpliest way to make xdtv use the default eventmap configuration, but respond to key presses in xdtv mode only looks like this: begin xdtv begin prog = xdtv config = eventmap end end xdtv Question: Is there any default configuration? ------------------------------------------------------------------------------------- Yes, of course, those one which is written into lirc.c file. (Search this: "default mappings") Question: How to modify the default config? ------------------------------------------------------------------------------------- Into the xdtvrc config file, you can see this empty section: # # eventmap # To complete it, write something like that: # # eventmap # lirc-key-0 = keypad 0 repeat = 1 lirc-key-1 = keypad 1 repeat = 1 lirc-key-2 = keypad 2 repeat = 1 lirc-key-3 = keypad 3 repeat = 1 lirc-key-4 = keypad 4 repeat = 1 lirc-key-5 = keypad 5 repeat = 1 lirc-key-6 = keypad 6 repeat = 1 lirc-key-7 = keypad 7 repeat = 1 lirc-key-8 = keypad 8 repeat = 1 lirc-key-9 = keypad 9 repeat = 1 lirc-key-ch+ = setstation next repeat = 0 lirc-key-ch- = setstation prev repeat = 0 lirc-key-vol+ = volume inc repeat = 0 lirc-key-vol- = volume dec repeat = 0 lirc-key-Mute = volume mute repeat = 1 lirc-key-full_screen = fullscreen toggle repeat = 1 lirc-key-source = setinput next repeat = 0 Usualy: lirc-key-A = the_command repeat = n This will map key A on your remote with the_command (check xdtv_cmd) repeat = n tells the program what shall happen if a key is repeated. A value of zero tells the program to ignore repeated keys. Any other positive value 'n' tells the program to pass the command every 'n'-th time, when a key is repeated. Be careful: No "repeat" key after a lirc-key will force mapping to "repeat=0" (defaults from lirc.c are totaly overriden for lirc--source) To follow. Pingus ------------------------------------------------------------------------------------- This README is based on xawTV Gerd documentation. Thanks to Hayvan for his help too. ------------------------------------------------------------------------------------- FRANCAIS: --------- Début d'implémentation du support de l'eventmap (support incomplet à ce jour). Par Lucian Langa <cooly@eweb.ro>: merci pour son adaptation. Question: Qu'est ce que l'eventmap? ------------------------------------------------------------------------------------- L'eventmap est un système général qui permet d'intercepter des évenements (appui sur une touche de la télécommande, du clavier, d'un synthétiseur, d'un joystick, etc.) auquel il est possible d'associer à chaque évenement une action précise. Question: Comment l'activer? ------------------------------------------------------------------------------------- Si le fichier de configuration ~/.lircrc n'existe pas, xdtv va alors générer des évènements lirc-key-* pour chaque touche qui sera pressée sur votre télécommande et ceci de façon automatique mais avec un offset. Si le fichier de configuration ~/.lircrc existe, xdtv l'utilisera encore. Le mot "config" etant le moyen traditionnel de configurer le support Lirc de xdtv, il sera donc encore utilisé. Pour cela, placez donc devant le mot "config" le mot "eventmap". Cela permettra alors à xdtv de générer directement des évènements lirc-key-*. la principale différence entre avoir ou non un fichier de configuration ~/.lircrc est qu'il vous est alors possible de choisir facilement le mode de gestion des touches de votre télécommande (l'ancien ou le nouveau). Le moyen le plus simple de permettre à xdtv d'utiliser la configuration par défaut de l'eventmap est donc d'écrire votre fichier de configuration ~/.lircrc de la façon suivante: begin xdtv begin prog = xdtv config = eventmap end end xdtv Question: Existe-il une configuration par défaut ? ------------------------------------------------------------------------------------- Oui, celle apparaissant dans le fichier lirc.c (pour la connaitre, recherchez la phrase "default mappings") Question: Comment changer la configuration par défaut? ------------------------------------------------------------------------------------- Dans le fichier xdtvrc vous trouverez une section vide: # # eventmap # Il suffit alors de l'enrichir, par exemple, de la façon suivante: # # eventmap # lirc-key-0 = keypad 0 repeat = 1 lirc-key-1 = keypad 1 repeat = 1 lirc-key-2 = keypad 2 repeat = 1 lirc-key-3 = keypad 3 repeat = 1 lirc-key-4 = keypad 4 repeat = 1 lirc-key-5 = keypad 5 repeat = 1 lirc-key-6 = keypad 6 repeat = 1 lirc-key-7 = keypad 7 repeat = 1 lirc-key-8 = keypad 8 repeat = 1 lirc-key-9 = keypad 9 repeat = 1 lirc-key-ch+ = setstation next repeat = 0 lirc-key-ch- = setstation prev repeat = 0 lirc-key-vol+ = volume inc repeat = 0 lirc-key-vol- = volume dec repeat = 0 lirc-key-Mute = volume mute repeat = 1 lirc-key-full_screen = fullscreen toggle repeat = 1 lirc-key-source = setinput next repeat = 0 Habituellement: lirc-key-A = la_commande repeat = n cette méthode va permettre de faire correspondre à une touche A de votre télécommande une commande dispobible via xdtv_cmd (voir le fichier man correspondant pour avoir la liste des possibles). repeat = n permet de faire comprendre au pogramme si une touche doit ou non être répétée. Si la valeur est à zéro alors le programme ignorera les répétitions de touche. Dans les cas ou la valeur n est > 0, n signifiera au programme de lancer la commande n fois. Attention: Si aucune clef "repeat" ne se trouve après une clef lirc-key, alors repeat sera passé à 0 (Les paramètres par défaut contenus dans le fichier lirc.c sont totalement écrasés pour la clef lirc configurée) 1 A suivre. Pingus ------------------------------------------------------------------------------------- Ce fichier README a été construit à partir de la documentation xawTV de Gerd. merci également à Hayvan pour son aide.