Touches mortes et URxvt

Yop les gens,

Voila, j’ai un petit souci avec URxvt. Gnome-terminal ayant fini par me souler (chaque onglet étant lourd en ressources, il est moche, etc.), je suis passé à URxvt, qui me convient parfaitement, à un truc près : la gestion des touches mortes.

En effet, j’ai un clavier qwerty, et j’utilise les touches mortes pour afficher les accents. Je tape alt-gr+touche de l’accent, puis la lettre à accentuer (alt-gr+e e, pour un é, ou alt-gr ` u pour un ù, etc.). Ça me convient parfaitement, sauf qu’URxvt, au contraire de gnome, n’accepte pas ces touches mortes, ce qui est assez embêtant lorsque je tape du français dans un terminal (étant adepte de vim, LaTeX, des fichiers en texte brut et utilisant au minimum OOo writer, ça m’arrive souvent et c’est problématique).

Donc si quelqu’un sait comment faire accepter les touches mortes à URxvt, ça m’interesserait grandement.

Merci d’avance.

cyphaw

Il me semble pourtant que ce soit paramétrable dans le fichiers de configuration de Urxvt ( UTF-8 :unamused: moi je suis rester à rxvt :033 ).

Salut,

Tu as configuré ton clavier via l’utilitaire GNOME (US+intl), enfin je suppose, et urxvt lui, ne sait rien du réglage effectué via GNOME.

Lances URxvt et utilise cette commande :

setxkbmap -layout us -variant intl

Ce qui fonctionne très bien chez moi avec URxvt en faisant +u,+a (sans AltGr) , AltGr-e pour ‘é’ etc.

Il te faudra créer un xorg.conf par la suite avec ces paramètres:

Section "InputDevice"
        Identifier  "Keyboard0"
        Driver      "kbd"
       Option      "XkbLayout"    "us"
       Option      "XkbVariant"   "intl"
EndSection

Ça m’a l’air d’être une bonne piste, mais c’est pas encore ça. Les touches mortes ne fonctionnent toujours pas et certaines touches ne correspondent plus au clavier, mais je peux faire certains accents.

En fait la j’ai un mac en qwerty, en disposition USA Macintosh avec quelques modifs : transformer le alt droite en alt-gr (tout ça configuré dans l’utilitaire gnome) et l’inversion des deux touches `~ et §± par mon .Xmodmap avec

keycode 94 = grave asciitilde grave asciitilde dead_grave dead_horn keycode 49 = section plusminus section plusminus section plusminus

J’ai l’impression qu’il n’y a pas vraiment moyen de faire marcher les touches mortes dans URxvt, j’ai vu des threads parlant de recompiler URxvt, mais rien de concret. Je vais continuer à fouiller, et peut-être changer mon layout pour un similaire à celui que t’as mentionné.

Merci.

Je ne sais pas si ça peut être utile, mais dans le man de urxvt, tu as ceci :

[code] -keysym.sym string
Remap a key symbol. See resource keysym.

…[plus bas]

keysym.sym: string
Compile frills: Associate string with keysym sym. The intervening resource name keysym.
cannot be omitted.

       The format of sym is "(modifiers-)key", where modifiers can be any combination of
       ISOLevel3, AppKeypad, Control, NumLock, Shift, Meta, Lock, Mod1, Mod2, Mod3, Mod4, Mod5,
       and the abbreviated I, K, C, N, S, M, A, L, 1, 2, 3, 4, 5.

       The NumLock, Meta and ISOLevel3 modifiers are usually aliased to whatever modifier the
       NumLock key, Meta/Alt keys or ISO Level3 Shift/AltGr keys are being mapped. AppKeypad is a
       synthetic modifier mapped to the current application keymap mode state.

       The spellings of key can be obtained by using xev(1) command or searching keysym macros
       from /usr/X11R6/include/X11/keysymdef.h and omitting the prefix XK_. Alternatively you can
       specify key by its hex keysym value (0x0000 - 0xFFFF). Note that the lookup of syms is not
       performed in an exact manner; however, the closest match is assured.

       string may contain escape values ("\n": newline, "\000": octal number), see RESOURCES in
       "man 7 X" for further details.

       You can define a range of keysyms in one shot by providing a string with pattern
       list/PREFIX/MIDDLE/SUFFIX, where the delimiter `/' should be a character not used by the
       strings.

       Its usage can be demonstrated by an example:

         URxvt.keysym.M-C-0x61:    list|\033<M-C-|abc|>

       The above line is equivalent to the following three lines:

         URxvt.keysym.Meta-Control-0x61:    \033<M-C-a>
         URxvt.keysym.Meta-Control-0x62:    \033<M-C-b>
         URxvt.keysym.Meta-Control-0x63:    \033<M-C-c>

       If string takes the form of "command:STRING", the specified STRING is interpreted and
       executed as urxvt's control sequence. For example the following means "change the current
       locale to "zh_CN.GBK" when Control-Meta-c is being pressed":

         URxvt.keysym.M-C-c: command:\033]701;zh_CN.GBK\007

       If string takes the form "perl:STRING", then the specified STRING is passed to the
       "on_user_command" perl handler. See the urxvtperl(3) manpage. For example, the selection

extension (activated via “urxvt -pe selection”) listens for “selection:rot13” events:

         URxvt.keysym.M-C-c: perl:selection:rot13

       Due the the large number of modifier combinations, a defined key mapping will match if at
       least the specified identifiers are being set, and no other key mappings with those and
       more bits are being defined. That means that defining a key map for "a" will automatically
       provide definitions for "Meta-a", "Shift-a" and so on, unless some of those are defined
       mappings themselves.

       Unfortunately, this will override built-in key mappings. For example if you overwrite the
       "Insert" key you will disable urxvt's "Shift-Insert" mapping. To re-enable that, you can
       poke "holes" into the user-defined keymap using the "builtin:" replacement:

         URxvt.keysym.Insert: <my insert key sequence>
         URxvt.keysym.S-Insert: builtin:

       The first line defines a mapping for "Insert" and any combination of modifiers. The second
       line re-establishes the default mapping for "Shift-Insert".

       The following example will map Control-Meta-1 and Control-Meta-2 to the fonts "suxuseuro"
       and "9x15bold", so you can have some limited font-switching at runtime:

         URxvt.keysym.M-C-1: command:\033]50;suxuseuro\007
         URxvt.keysym.M-C-2: command:\033]50;9x15bold\007

       Other things are possible, e.g. resizing (see urxvt(7) for more info):

         URxvt.keysym.M-C-3: command:\033[8;25;80t
         URxvt.keysym.M-C-4: command:\033[8;48;110t

…[/code]

Sinon tu peux regarder st chez suckless, encore en développement actif, mais facile à compiler et à ajouter ses raccourcis (en éditant le fichier config.h) : st.suckless.org/
à toi de voir :slightly_smiling:

Ok, j’ai trouvé d’où vient peut-être le problème, mais pas vraiment comment le résoudre : ça vient d’ibus.
J’utilise ibus pour pouvoir taper des caractères exotiques, et manifestement, ibus+urxvt n’aime pas les touches mortes.

Si je kill et relance le deamon (depuis urxvt, je sais pas si ça a une influence), ibus n’influe plus sur urxvt, je ne peux plus taper mes caractères exotiques (ce qui n’est pas un souci) mais les touches mortes fonctionnent (à noter que ça ne pose ce problème que pour urxvt, partout ailleurs, touches mortes et ibus fonctionnent sans soucis, même dans gnome-terminal ou guake-terminal).

Le truc va maintenant être de trouver comment ibus se lance automatiquement et peut-être comment le lancer autrement pour qu’il n’influe pas sur urxvt.

D’ailleurs, il n’est pas dans la liste des applis au démarrage et il n’y a rien dans les prefs concernant le lancement d’ibus-deamon, quelqu’un saurait comment le désactiver ?