Изменение раскладки клавиатуры в Ubuntu 20

В моем ноутбуке hp есть немецкая клавиатура, которая, похоже, представляет собой версию американской клавиатуры. Из-за этого ему не хватает клавиши <> | , которая обычно расположена справа от l-shift на немецких клавиатурах.

Это, очевидно, очень раздражает, и до сих пор я не смог найти альтернативу комбинация клавиш, которая будет генерировать < или > . Кажется, что есть раскладка клавиатуры под названием E2, которая идеально подходит моей клавиатуре ( https://de.wikipedia.org/wiki/Tastaturbelegung#Tastaturbelegung_E2 ). Тем не менее, похоже, что в Ubuntu 20 из коробки его не поддерживают.

Кто-нибудь знает, как я могу получить раскладку E2 для linux или как я мог бы создать альтернативное сопоставление клавиш для < и > . Учебники, которые я нашел в Интернете о том, как настроить раскладку клавиатуры, кажутся устаревшими, и я не смог заставить их работать в Ubuntu 20.

Вот что я пытался:

Я пытался следовать этому учебное пособие https://help.ubuntu.com/community/Custom%20keyboard%20layout%20definitions .

Я попытался переназначить ALTGR-Y в < и ALTGR-X - > с использованием xkb.

I ' В настоящее время я использую раскладку клавиатуры Немецкий (Macinthosh) , поэтому я отредактировал файл / usr / share / X11 / xkb / symbols / macintosh_vndr / de .

В основном файле xkb_symobls "Я добавил следующие сопоставления:

    key <AB01> {        [         y,    Y,      less,   guillemotleft           ]       };
    key <AB02> {        [         x,    X,      greater,        guillemotright          ]       };

Затем я перезагрузился, но ALGR-Y и ALTGR-X по-прежнему дают мне неправильные символы. : (

Дополнительная информация:

$ setxkbmap -print -verbose 10

Setting verbose level to 10
locale is C
Trying to load rules file ./rules/evdev...
Trying to load rules file /usr/share/X11/xkb/rules/evdev...
Success.
Applied rules from evdev:
rules:      evdev
model:      pc105
layout:     de,us
variant:    mac,
options:    caps:escape
Trying to build keymap using the following components:
keycodes:   evdev+aliases(qwertz)
types:      complete
compat:     complete
symbols:    pc+de(mac)+us:2+inet(evdev)+capslock(escape)
geometry:   pc(pc105)
xkb_keymap {
    xkb_keycodes  { include "evdev+aliases(qwertz)" };
    xkb_types     { include "complete"  };
    xkb_compat    { include "complete"  };
    xkb_symbols   { include "pc+de(mac)+us:2+inet(evdev)+capslock(escape)"  };
    xkb_geometry  { include "pc(pc105)" };
};

cat / usr / share / X11 / xkb / symbols / macintosh_vndr / de

// olh@suse.de   very close to MacOS map

default partial alphanumeric_keys 
xkb_symbols "basic" {

    // Describes the differences between a very simple US/ASCII
    // keyboard and a simple German keyboard.

    include "latin"
    name[Group1]= "Germany - Mac";

    key <TLDE> {    [ dead_circumflex,  degree,    notsign      ]};
    key <AE01> {    [         1,    exclam,  exclamdown,   at       ]};
    key <AE02> {    [     2,    quotedbl,  twosuperior          ]};
    key <AE03> {    [     3,    section,  threesuperior,sterling    ]};
    key <AE04> {    [     4,    dollar,  onequarter,    currency    ]};
    key <AE05> {    [     5,    percent,  bracketleft           ]};
    key <AE06> {    [     6,    ampersand,  bracketright        ]};
    key <AE07> {    [     7,    slash,        bar,    backslash     ]};
    key <AE08> {    [     8,    parenleft,  braceleft,    asciitilde    ]};
    key <AE09> {    [     9,    parenright, braceright          ]};
    key <AE10> {    [     0,    equal,  braceright, degree      ]};
    key <AE11> {    [    ssharp,    question,  backslash,   questiondown    ]};
    key <AE12> {    [ dead_acute,   dead_grave,  dead_cedilla       ]};

    key <AD01> {    [     q,    Q, guillemotleft,guillemotright ]   };
    key <AD03> {    [     e,    E,   EuroSign           ]   };
    key <AD04> {    [         r,    R,  registered          ]   };
    key <AD05> {    [     t,    T       ]   };
    key <AD06> {    [     z,    Z       ]   };
    key <AD07> {    [     u,    U, diaeresis,    Aacute     ]   };
    key <AD08> {    [     i,    I,      slash,    Ucircumflex   ]   };
    key <AD09> {    [         o,    O,      oslash,   Ooblique  ]   };
    key <AD11> {    [ udiaeresis,   Udiaeresis,  periodcentered, degree ]};
    key <AD12> {    [      plus,    asterisk,  asciitilde           ]}; 
    key <AC01> {    [         a,    A,      aring,    Aring     ]   };
    key <AC04> {    [     f,    F       ]   };
    key <AC05> {    [     g,    G,  copyright           ]   };
    key <AC06> {    [         h,    H,  ordfeminine         ]   };
    key <AC09> {    [     l,    L,  at          ]   };
    key <AC10> {    [ odiaeresis,   Odiaeresis,  dead_acute         ]};
    key <AC11> {    [ adiaeresis,   Adiaeresis,  dead_circumflex        ]};

    key <LSGT> {    [      less,    greater,        bar         ]};
    key <AB01> {    [     y,    Y,  less,   guillemotleft       ]};
    key <AB02> {    [     x,    X,  greater,    guillemotright  ]};
    key <AB06> {    [         n,    N, asciitilde           ]   };
    key <AB07> {    [     m,    M,   mu         ]   };
    key <AB08> {    [     comma,    semicolon   ]   };
    key <AB09> {    [    period,    colon,  periodcentered, division    ]};
    key <AB10> {    [     minus,    underscore  ]   };
    key <BKSL> {    [ numbersign,   apostrophe,  dead_grave         ]};

    key <BKSL> {    [ numbersign,   apostrophe,  dead_grave         ]};


    include "kpdl(comma)"
    include "level3(ralt_switch)"
};

partial alphanumeric_keys 
xkb_symbols "Sundeadkeys" {
    // modify the default German layout to use Sun dead keys
    include "macintosh_vndr/de(basic)"
    name[Group1]= "Germany - Mac, Sun dead keys";

    key <TLDE> {    [ SunFA_Circum, degree,      notsign            ]};
    key <AE12> {    [ SunFA_Acute,  SunFA_Grave, SunFA_Cedilla      ]};
    key <AD11> {    [ udiaeresis,   Udiaeresis,  SunFA_Diaeresis        ]};
    key <AD12> {    [       plus,   asterisk,    SunFA_Tilde,  dead_macron  ]};
    key <AC10> {    [ odiaeresis,   Odiaeresis,  SunFA_Acute        ]};
    key <AC11> {    [ adiaeresis,   Adiaeresis,  SunFA_Circum       ]};

    key <BKSL> {    [ numbersign,   acute,       SunFA_Grave        ]};
};

partial alphanumeric_keys 
xkb_symbols "sundeadkeys" {
    include "macintosh_vndr/de(Sundeadkeys)"
};

partial alphanumeric_keys 
xkb_symbols "nodeadkeys" {
    // modify the default German layout to not have any dead keys
    include "macintosh_vndr/de(basic)"
    name[Group1]= "Germany - Mac, no dead keys";

    key <TLDE> {    [ asciicircum,  degree,    notsign          ]};
    key <AE12> {    [ acute,    grave,  cedilla             ]};
    key <AD11> {    [ udiaeresis,   Udiaeresis,  diaeresis          ]};
    key <AD12> {    [      plus,    asterisk,  asciitilde,  macron      ]};
    key <AC10> {    [ odiaeresis,   Odiaeresis,  acute          ]};
    key <AC11> {    [ adiaeresis,   Adiaeresis,  asciicircum        ]};

    key <BKSL> {    [ numbersign,   apostrophe,  grave          ]};
};
0
задан 11 July 2020 в 08:39

1 ответ

You edited the wrong file. Try to edit the basic German layout in /usr/share/X11/xkb/symbols/de instead.

It includes these two lines:

    key <AB01>  { [         y,          Y,       guillemotright,    U203A   ] };
    key <AB02>  { [         x,          X,        guillemotleft,    U2039   ] };

Change those to:

    key <AB01>  { [         y,          Y,       less,      guillemotright  ] };
    key <AB02>  { [         x,          X,       greater,   guillemotleft   ] };

The layout for German (Macintosh) (in the same file) includes German, so that ought to work.

1
ответ дан 30 July 2020 в 22:10

Другие вопросы по тегам:

Похожие вопросы: