Utilisateur:Legrostdg

De Disposition de clavier bépo

La variante proposée par Nbrodu est très utile mais étant plutôt adepte de vim, je n'utilise pas beaucoup les raccourcis en Ctrl+… En revanche return, delete, backspace et escape avaient selon moi besoin d'être plus accessibles. J'en ai profité pour mettre les touches de direction "alla vim" et ajuster les touches début, fin, pgup et pgdn de manière plus homogène.

J'ai également rajouté des touches dead-modificateur (plus parce que j'étais content d'avoir trouvé comment faire qu'autre chose).

L'espace insécable n'est plus accessible qu'en altgr+maj+space ou en fn+space: je trouvais ça trop dangereux pour la programmation.


Fn « déplacement/édition »

┌────┬────┬────┬────┬────┬────┬────┬────┬────┬────┬────┬────┬────╔═════════╗
│    │    │    │    │    │    │    ║    │    │    │    │    │    ║         ║
│    │    │    │    │    │    │    ║    │    │    │    │    │    ║ <--     ║
╔════╧══╗─┴──┬─┴──┬─┴──┬─┴──┬─┴──┬─┴──┬─┴──┬─┴──┬─┴──┬─┴──┬─┴──┬─╚══╦══════╣
║  |<-  ║dead│dead│dead│dead│    ║    │    │    │    │    │    │    ║   |  ║
║  ->|  ║ctrl│ maj│ alt│altg│    ║    │    │    │    │    │    │    ║ <-'  ║
╠═══════╩╗───┴┬───┴┬───┴┬───┴┬───┴┬───┴┬───┴┬───┴┬───┴┬───┴┬───┴┬───╚╗     ║
║        ║    │    │    │    │Com-║    │    │    │    │    │    │    ║     ║
║ Maj. ⇑ ║ esc│ del│bksp│entr│pose│ ←  │ ↓  │ ↑  | →  │ esc│    │    ║     ║
╠══════╦═╝──┬─┴──┬─┴──┬─┴─══─┴──┬─┴──┬─┴─══─┴──┬─┴──┬─┴──┬─┴──╔═╧════╩═════╣
║ «»’  ║    │    │    │    │    │    ║    │    │    │    │    ║     ^      ║
║ <>'  ║    │    │    │    │    │    ║ deb│pgdn│pgup│ fin│    ║     |      ║
╠══════╩╦═══╧══╦═╧═══╦╧════╧════╧════╧════╧════╧╦═══╧═╦══╧════╬═════╦══════╣
║       ║      ║     ║                          ║     ║       ║     ║      ║
║ Ctrl  ║ Alt  ║ Fn ⇄║   Espace insécable       ║AltGr║Compose║WinM ║ Ctrl ║
╚═══════╩══════╩═════╩══════════════════════════╩═════╩═══════╩═════╩══════╝


Des idées ?

Si vous avez des idées pour améliorer cette super couche « déplacement/édition » rajoutez-les ici !


Mon fichier .xkb


xkb_keymap        {

xkb_keycodes      { include "xfree86+aliases(azerty)" };

xkb_types         {
    include "complete"
    type "ALTGR_TWO" {
       modifiers = LevelThree;
       map[None] = Level1;
       map[LevelThree] = Level2;
       level_name[Level1] = "Base";
       level_name[Level2] = "AltGr";
    };
};

xkb_compatibility { include "complete"
        
        indicator "Scroll Lock" { controls = Overlay1; allowExplicit = True; drivesKeyboard = True; };
        
        interpret F24 {
            action = Redirect(Key=<I6C>, modifiers=Control); // ctrl-r
        };
        interpret F25 {
            action = Redirect(Key=<I6D>, modifiers=Control); // ctrl-f
        };
        interpret F26 {
            action = LockControls(controls=Overlay1);
        };
        interpret F27 {
            action = Redirect(Key=<I6E>, modifiers=Control); // ctrl-s
        };
        interpret F28 {
            action = Redirect(Key=<LEFT>, modifiers=Control); // ctrl-â†
        };
        interpret F29 {
            action = Redirect(Key=<RGHT>, modifiers=Control); // ctrl-→
        };

        interpret F30 {
            action = Redirect(Key=<I6F>, modifiers=Mod1); // Alt-Tab
        };
        interpret F31 {
            action = Redirect(Key=<I71>, modifiers=Control); // ctrl-x
        };
        interpret F32 {
            action = Redirect(Key=<I72>, modifiers=Control); // ctrl-c
        };
        interpret F33 {
            action = Redirect(Key=<I73>, modifiers=Control); // ctrl-v
        };
        interpret F34 {
            action = Redirect(Key=<I74>, modifiers=Control); // ctrl-z
        };
        interpret F35 {
            action = Redirect(Key=<I75>, modifiers=Control); // ctrl-y
        };

};

partial alphanumeric_keys
xkb_symbols "dvorak" {

	name[Group1]= "France - Bepo, ergonomic, Dvorak way (v1.0rc2)";

	include "pc(pc105)"

	key <TLDE> { type[group1] = "FOUR_LEVEL", [ dollar, numbersign, endash, paragraph ], overlay1 = <I70> }; // $ # – ¶
	key <AE01> { type[group1] = "FOUR_LEVEL_SEMIALPHABETIC", [ quotedbl, 1, emdash, doublelowquotemark ], overlay1 = <I70> }; // " 1 — „
	key <AE02> {
	             type[group1] = "FOUR_LEVEL", [ guillemotleft, 2, less, leftdoublequotemark ], // « 2 < “
                     type[group2] = "FOUR_LEVEL", [ less, 2, guillemotleft, leftdoublequotemark ], // < 2 « “
                     overlay1 = <I70>
        };
	key <AE03> {
	             type[group1] = "FOUR_LEVEL", [ guillemotright, 3, greater, rightdoublequotemark ], // » 3 > ”
                     type[group2] = "FOUR_LEVEL", [ greater, 3, guillemotright, rightdoublequotemark ], // > 3 » ”
                     overlay1 = <I70>
        };
	//key <AE04> { type[group1] = "FOUR_LEVEL_SEMIALPHABETIC", [ parenleft, 4, bracketleft, lessthanequal ], overlay1 = <I70> }; // ( 4 [ 
	key <AE04> { type[group1] = "FOUR_LEVEL_SEMIALPHABETIC", [ parenleft, 4, parenleft, lessthanequal ], overlay1 = <I70> }; // ( 4 [ 
	//key <AE05> { type[group1] = "FOUR_LEVEL_SEMIALPHABETIC", [ parenright, 5, bracketright, greaterthanequal ], overlay1 = <I70> }; // ) 5 ] 
	key <AE05> { type[group1] = "FOUR_LEVEL_SEMIALPHABETIC", [ parenright, 5, parenright, greaterthanequal ], overlay1 = <I70> }; // ) 5 ] 
	key <AE06> { type[group1] = "FOUR_LEVEL_SEMIALPHABETIC", [ at, 6, asciicircum ], overlay1 = <I70> }; // @ 6 ^
	key <AE07> { type[group1] = "FOUR_LEVEL_SEMIALPHABETIC", [ plus, 7, plusminus, notsign ], overlay1 = <I70> }; // + 7 ± ¬
	key <AE08> { type[group1] = "FOUR_LEVEL_SEMIALPHABETIC", [ minus, 8, U2212, onequarter ], overlay1 = <I70> }; // - 8 − ¼
	key <AE09> { type[group1] = "FOUR_LEVEL_SEMIALPHABETIC", [ slash, 9, division, onehalf ], overlay1 = <I70> }; // / 9 ÷ ½
	key <AE10> { type[group1] = "FOUR_LEVEL_SEMIALPHABETIC", [ asterisk, 0, multiply, threequarters ], overlay1 = <I70> }; // * 0 × ¾
	key <AE11> { type[group1] = "FOUR_LEVEL", [ equal, degree, notequal, minutes ], overlay1 = <I70> }; // = ° ≠
	key <AE12> { type[group1] = "FOUR_LEVEL", [ percent, grave, U2030, seconds ], overlay1 = <I70> }; // % ` ‰
	key <AD01> { type[group1] = "FOUR_LEVEL_SEMIALPHABETIC", [ b, B, bar, brokenbar ], overlay1 = <FK13> }; // b B | ¦ dead_ctrl
	key <AD02> { type[group1] = "FOUR_LEVEL_SEMIALPHABETIC", [ eacute, Eacute, dead_acute, dead_doubleacute ], overlay1 = <FK14> }; // é É ´ ˝ dead_shift
	key <AD03> { type[group1] = "FOUR_LEVEL_SEMIALPHABETIC", [ p, P, ampersand, section ], overlay1 = <FK15> }; // p P & § dead_alt
	key <AD04> { type[group1] = "FOUR_LEVEL_ALPHABETIC", [ o, O, oe, OE ], overlay1 = <FK16> }; // o O œ Œ dead_altgr
	//key <AD05> { type[group1] = "FOUR_LEVEL_SEMIALPHABETIC", [ egrave, Egrave, dead_grave, grave ], }; // è È ` `
	key <AD05> { type[group1] = "FOUR_LEVEL_SEMIALPHABETIC", [ w, W, dead_breve ], overlay1 = <I70> }; // w W ˘
	key <AD06> { type[group1] = "THREE_LEVEL", [ dead_grave, exclam, exclamdown ], overlay1 = <I70> }; // ` ! ¡
	key <AD07> { type[group1] = "FOUR_LEVEL_SEMIALPHABETIC", [ v, V, dead_caron ], overlay1 = <I70> }; // v V ˇ
	key <AD08> { type[group1] = "FOUR_LEVEL_ALPHABETIC", [ d, D, eth, ETH ], overlay1 = <I70>}; // d D ð Ð
	key <AD09> { type[group1] = "FOUR_LEVEL_SEMIALPHABETIC", [ l, L, UFDD0 ], overlay1 = <I70>}; // l L /
	key <AD10> { type[group1] = "FOUR_LEVEL_ALPHABETIC", [ j, J, U0133, U0132 ], overlay1 = <I70>}; // j J ij IJ
        key <AD11> { type[group1] = "FOUR_LEVEL", [ dead_circumflex, dead_caron, schwa, SCHWA ], overlay1 = <I70> }; // ^ ˇ ə Ə
        key <AD12> { type[group1] = "FOUR_LEVEL", [ dead_diaeresis, dead_abovedot, dead_breve, VoidSymbol ], overlay1 = <I70> }; // ¨ ˙ ˘
	key <AC01> { type[group1] = "FOUR_LEVEL_ALPHABETIC", [ a, A, ae, AE ], overlay1 = <ESC> }; // a A æ Æ escape
        key <AC02> { type[group1] = "FOUR_LEVEL_ALPHABETIC", [ u, U, bracketleft ], overlay1 = <DELE> }; // u U [ delete
	key <AC03> { type[group1] = "FOUR_LEVEL_SEMIALPHABETIC", [ i, I, bracketright ], overlay1 = <BKSP> }; // i I ] backspace
	key <AC04> { type[group1] = "FOUR_LEVEL_SEMIALPHABETIC", [ e, E, EuroSign, UFDD1 ], overlay1 = <RTRN> }; // e E € ¤ return
        key <AC05> {
            type[group1] = "FOUR_LEVEL", [ comma, semicolon, rightsinglequotemark, dead_horn  ], // , ; ' 
            type[group2] = "FOUR_LEVEL", [ comma, semicolon, apostrophe, dead_horn  ],           // , ; ’
            overlay1 = <FK17>                                                                    // multi_key
        };
	key <AC06> { type[group1] = "FOUR_LEVEL_SEMIALPHABETIC", [ c, C, copyright, U017F ], overlay1 = <LEFT> }; // c C © ſ
	key <AC07> { type[group1] = "FOUR_LEVEL_ALPHABETIC", [ t, T, thorn, THORN ], overlay1 = <DOWN> }; // t T þ Þ
	key <AC08> { type[group1] = "FOUR_LEVEL_ALPHABETIC", [ s, S, ssharp, U1E9E ], overlay1 = <UP> }; // s S ß ẞ
	key <AC09> { type[group1] = "FOUR_LEVEL_SEMIALPHABETIC", [ r, R, registered, trademark ], overlay1 = <RGHT> }; // r R ® ™
	key <AC10> { type[group1] = "FOUR_LEVEL_SEMIALPHABETIC", [ n, N, dead_tilde ], overlay1 = <ESC> }; // n N ~ escape
	key <AC11> { type[group1] = "FOUR_LEVEL_SEMIALPHABETIC", [ m, M, dead_macron, masculine ], overlay1 = <I70> }; // m M ¯ º
	key <BKSL> { type[group1] = "FOUR_LEVEL_SEMIALPHABETIC", [ ccedilla, Ccedilla, dead_cedilla, UFDD3 ], overlay1 = <I70> }; // ç Ç ¸ ,

	key <LSGT> { type[group1] = "FOUR_LEVEL_SEMIALPHABETIC", [ ecircumflex, Ecircumflex, slash, VoidSymbol ], overlay1 = <I70> }; // ê Ê /
	key <AB01> { type[group1] = "FOUR_LEVEL_SEMIALPHABETIC", [ z, Z, backslash, VoidSymbol ], overlay1 = <I70> }; // z Z \
	key <AB02> { type[group1] = "FOUR_LEVEL_SEMIALPHABETIC", [ y, Y, braceleft, leftsinglequotemark ], overlay1 = <I70> }; // y Y { ‘
	key <AB03> { type[group1] = "FOUR_LEVEL_SEMIALPHABETIC", [ x, X, braceright, rightsinglequotemark ], overlay1 = <I70> }; // x X } ’
	key <AB04> { type[group1] = "FOUR_LEVEL", [ period, colon, ellipsis, periodcentered ], overlay1 = <I70> }; // . : … ·
	key <AB05> { type[group1] = "FOUR_LEVEL_SEMIALPHABETIC", [ k, K, asciitilde, dead_tilde ], overlay1 = <I70> }; // k K ~
        key <AB06> {
            type[group1] = "FOUR_LEVEL", [ apostrophe, question, questiondown, dead_hook ],           // ’ ? ¿ ̉
            type[group2] = "FOUR_LEVEL", [ rightsinglequotemark, question, questiondown, dead_hook ], // ' ? ¿ ̉
            overlay1 = <HOME>                                                                         // home
        }; 
	key <AB07> { type[group1] = "FOUR_LEVEL_SEMIALPHABETIC", [ q, Q, dead_abovering, dead_belowdot ], overlay1 = <PGDN> }; // q Q ˚ ̣pgdn
	key <AB08> { type[group1] = "FOUR_LEVEL_SEMIALPHABETIC", [ g, G, UFDD2 ], overlay1 = <PGUP> }; // g G µ pgup
	key <AB09> { type[group1] = "FOUR_LEVEL_SEMIALPHABETIC", [ h, H, dagger, doubledagger ], overlay1 = <END> }; // h H † ‡
	key <AB10> { type[group1] = "FOUR_LEVEL_SEMIALPHABETIC", [ f, F, dead_ogonek, ordfeminine ], overlay1 = <I70> }; // f F ˛ ª
        key <SPCE> { type[group1] = "FOUR_LEVEL", [ space, space, underscore, nobreakspace ], overlay1 = nobreakspace }; //     _ 


        // Unused keys mapped to ctrl+letter actions
        key <I6C> { [ r ] };
        key <I6D> { [ f ] };
        key <I6E> { [ s ] };
        key <I6F> { [ Tab ] };
        key <I70> { [ VoidSymbol ] };
        key <I71> { [ x ] };
        key <I72> { [ c ] };
        key <I73> { [ v ] };
        key <I74> { [ z ] };
        key <I75> { [ y ] };
        key <I76> { [ space ] };


        // For some reason there are SOMETIMES (not always!) errors with this code:
        //    key <I7A> { actions[group1] = [ Redirect(keycode=<I71>, modifiers=Control) ] };      // ctrl-x
        //    key <I7B> { actions[group1] = [ Redirect(keycode=<I72>, modifiers=Control) ] };      // ctrl-c
        //    key <I7C> { actions[group1] = [ Redirect(keycode=<I73>, modifiers=Control) ] };      // ctrl-v
        //    key <I7D> { actions[group1] = [ Redirect(keycode=<I74>, modifiers=Control) ] };      // ctrl-z
        //    key <I7E> { actions[group1] = [ Redirect(keycode=<I75>, modifiers=Control) ] };      // ctrl-y


        // However passing the action in the « interpret » section for an unsused symbol seems to work
        key <I60> { [ F24 ] };      // ctrl-R
        key <I61> { [ F25 ] };      // ctrl-F
        key <I77> { [ F28 ] };      // ctrl-left
        key <I78> { [ F29 ] };      // ctrl-right
        key <I79> { [ F30 ] };      // Alt+Tab


        //    key <I79> { [ Tab ], actions = [ setMods(modifiers=Mod1) ] };      // Alt+Tab

        key <I7A> { [ F31 ] };      // ctrl-x
        key <I7B> { [ F32 ] };      // ctrl-c
        key <I7C> { [ F33 ] };      // ctrl-v
        key <I7D> { [ F34 ] };      // ctrl-z
        key <I7E> { [ F35 ] };      // ctrl-y
        key <I7F> { [ F27 ] };      // ctrl-s


        // Using < 127 keycodes also works
        key <FK13> { actions = [ LatchMods(modifiers=Control) ] };        // dead ctrl
        key <FK14> { actions = [ LatchMods(modifiers=Shift) ] };          // dead shift
        key <FK15> { actions = [ LatchMods(modifiers=Alt) ] };            // dead alt
        key <FK16> { actions = [ LatchMods(modifiers=AltGr) ] };          // dead altgr
        key <FK17> { [ Multi_key ] };                                     // multi_key
        //    key <FK13> { actions[group1] = [ Redirect(keycode=<I71>, modifiers=Control) ] };      // ctrl-x
        //    key <FK14> { actions[group1] = [ Redirect(keycode=<I72>, modifiers=Control) ] };      // ctrl-c
        //    key <FK15> { actions[group1] = [ Redirect(keycode=<I73>, modifiers=Control) ] };      // ctrl-v
        //    key <FK16> { actions[group1] = [ Redirect(keycode=<I74>, modifiers=Control) ] };      // ctrl-z
        //    key <FK17> { actions[group1] = [ Redirect(keycode=<I75>, modifiers=Control) ] };      // ctrl-y

        // See also the bug thread here : https://bugs.freedesktop.org/show_bug.cgi?id=12401


        // Transforme CAPS en lock de couche alternative «déplacement/édition», et garde le caps-lock habituel en AltGr
        //    key <CAPS> { type = "ALTGR_TWO", actions = [ LockControls(controls=Overlay1), LockMods(modifiers=Lock) ] };

        // Pour échanger Shift et Caps_Lock
        //    key <CAPS> { [ Shift_L ], actions = [ SetMods(modifiers=Shift) ] };
        //    key <LFSH> {  [    Caps_Lock    ] };

        // Combinaison des 2 : attention, requiert que les LFSH et CAPS dans les définitions de la touche <AC01> soient aussi échangées dans la partie principale
        //    key <LFSH> { type = "ALTGR_TWO", actions = [ LockControls(controls=Overlay1), LockMods(modifiers=Lock) ] };
        //    key <CAPS> { [ Shift_L ], actions = [ SetMods(modifiers=Shift) ] };

        // shift + lock
        //    key <CAPS> { type = "ALTGR_TWO", [ Shift_L, Caps_Lock ], actions = [ SetMods(modifiers=Shift), LockMods(modifiers=Lock) ] };
        //    key <LFSH> { type = "ALTGR_TWO", actions = [ SetControls(controls=Overlay1), LockControls(controls=Overlay1) ] };


        // Pour transformer CAPS en un AltGr gauche, en gardant le lock habituel en AltGr
        //    key <CAPS> { type = "ALTGR_TWO", [ ISO_Level3_Shift, Caps_Lock ], actions = [ SetMods(modifiers=LevelThree), LockMods(modifiers=Lock) ] };

        // Pour transformer LWIN en un AltGr gauche
        //    key <LWIN> { [ ISO_Level3_Shift ], actions = [ SetMods(modifiers=LevelThree) ] };

        // Pour mettre un Compose sur RWIN
        // key <RWIN>  { [ Multi_key, Multi_key, Multi_key, Multi_key ] };
        // key <MENU>  { [ Multi_key, Multi_key, Multi_key, Multi_key ] };
        //key <MENU>  { [ Control_L ], actions = SetMods(modifiers=Control) ] };
        key <MENU>  { [ Control_L ], actions = [ SetMods(modifiers=Control) ] };
        key <RCTL>  { [ Multi_key, Multi_key, Multi_key, Multi_key ] };

        // Pour que LWIN permette de changer de groupe
        //    key <LWIN> { [  ISO_Next_Group, ISO_Prev_Group, ISO_Next_Group, ISO_Prev_Group ] };

        // Echange CTRL et Alt Gauches. Et puisque LWIN est réaffectée, garde un modificateur META en niveau 3 et 4 (AltGr)
        // Note: Activer cette option fonctionne mieux lorsque que l'on échange aussi les raccourcis du style Alt+Tab…
        //    key <LALT> {        [ Control_L ], actions = [ SetMods(modifiers=Control) ]       };
        //    key <LCTL> { type[group1] = "FOUR_LEVEL",  [       Alt_L,  Alt_L,  Meta_L, Meta_L         ], actions = [ SetMods(modifiers=Mod1), SetMods(modifiers=Mod1), SetMods(modifiers=Mod4), SetMods(modifiers=Mod4) ]       };


        key <CAPS> { type = "ALTGR_TWO", [ Shift_L, Caps_Lock ], actions = [ SetMods(modifiers=Shift), LockMods(modifiers=Lock) ] };
        key <LALT> { type = "ALTGR_TWO", [ VoidSymbol ], actions = [ SetControls(controls=Overlay1), LockControls(controls=Overlay1) ] };
        //    key <LALT> { type = "ONE_LEVEL", [ VoidSymbol ], actions = [ LockControls(controls=Overlay1) ] };
            
            key <LFSH> { [  ISO_Next_Group, ISO_Prev_Group, ISO_Next_Group, ISO_Prev_Group ] };
            key <LWIN> { type[group1] = "FOUR_LEVEL",  [ Alt_L, Alt_L, Meta_L, Meta_L ], actions = [ SetMods(modifiers=Mod1), SetMods(modifiers=Mod1), SetMods(modifiers=Mod4), SetMods(modifiers=Mod4) ] };

            // Make Alt+Tab still work in the overlay !
        //    key  <TAB> {
        //        // would need an appropriate type here [ Tab,  ISO_Left_Tab    ],
        //        overlay1 = <I79>
        //    };


	include "level3(ralt_switch)"
        
};

xkb_geometry { include "pc(pc105)" };

};