Google Chromebook Pixel 2013 上的 Ubuntu 22 04 顶行键重新映射

Google Chromebook Pixel 2013 上的 Ubuntu 22 04 顶行键重新映射

Google Chromebook Pixel 2013 上安装了 Google OS,OS 寿命终止,我换成了 Gallium,然后是 Elementary OS,还不错。喜欢 Ubuntu 22 04,但顶行键已重新映射到其他功能,甚至不确定有些键是干什么用的。有人知道如何重新映射顶行键以恢复原始功能 ESC、箭头 < 箭头 >、刷新、屏幕?、屏幕变小、屏幕变暗、屏幕变亮、关闭音量、降低音量、提高音量和电源(可以正常工作)

谢谢

答案1

替换下面的文件内容,(不要忘记先备份)
备份命令mv /usr/share/X11/xkb/symbols/pc /usr/share/X11/xkb/symbols/pc.old

/usr/share/X11/xkb/symbols/pc

default  partial alphanumeric_keys modifier_keys
xkb_symbols "pc105" {

    key <ESC>  {    [ Escape        ]   };

    // The extra key on many European keyboards:
    key <LSGT> {    [ less, greater, bar, brokenbar ] };

    // The following keys are common to all layouts.
    key <BKSL> {    [ backslash,    bar ]   };
    key <SPCE> {    [    space      ]   };

    include "srvr_ctrl(fkey2vt)"
    include "pc(editing)"
    include "keypad(x11)"

    key <BKSP> {    [ BackSpace, BackSpace  ]   };

    key  <TAB> {    [ Tab,  ISO_Left_Tab    ]   };
    key <RTRN> {    [ Return        ]   };

    key <CAPS> {    [ Caps_Lock     ]   };
    key <NMLK> {    [ Num_Lock      ]   };

    key <LFSH> {    [ Shift_L       ]   };
    key <LCTL> {    [ Control_L     ]   };
    key <LWIN> {    [ Super_L       ]   };

    key <RTSH> {    [ Shift_R       ]   };
    key <RCTL> {    [ Control_R     ]   };
    key <RWIN> {    [ Super_R       ]   };
    key <MENU> {    [ Menu          ]   };

    // Beginning of modifier mappings.
    modifier_map Shift  { Shift_L, Shift_R };
    modifier_map Lock   { Caps_Lock };
    modifier_map Control{ Control_L, Control_R };
    modifier_map Mod2   { Num_Lock };
    modifier_map Mod4   { Super_L, Super_R };

    // Fake keys for virtual<->real modifiers mapping:
    key <LVL3> {    [ ISO_Level3_Shift  ]   };
    key <MDSW> {    [ Mode_switch       ]   };
    modifier_map Mod5   { <LVL3>, <MDSW> };

    key <ALT>  {    [ NoSymbol, Alt_L   ]   };
    include "altwin(meta_alt)"

    key <META> {    [ NoSymbol, Meta_L  ]   };
    modifier_map Mod1   { <META> };

    key <SUPR> {    [ NoSymbol, Super_L ]   };
    modifier_map Mod4   { <SUPR> };

    key <HYPR> {    [ NoSymbol, Hyper_L ]   };
    modifier_map Mod4   { <HYPR> };
    // End of modifier mappings.

    key <OUTP> { [ XF86Display ] };
key <KIDN> { [XF86KbdBrightnessDown] };
key <KIUP> { [XF86KbdBrightnessUp] }; 
key <KITG> { [XF86KbdLightOnOff] }; 

key <FK01> { [XF86Back] }; 
key <FK02> { [XF86Forward] };
key <FK03> { [XF86Reload] }; 
key <FK04> { [Print] }; 
key <FK05> { [Super_L] }; 
key <FK06> { [XF86MonBrightnessDown] }; 
key <FK07> { [XF86MonBrightnessUp] }; 
key <FK08> { [XF86AudioMute] }; 
key <FK09> { [XF86AudioLowerVolume] }; 
key <FK10> { [XF86AudioRaiseVolume] }; 

key <LWIN> { [Caps_Lock] };

};

hidden partial alphanumeric_keys
xkb_symbols "editing" {
    key <PRSC> {
    type= "PC_ALT_LEVEL2",
    symbols[Group1]= [ Print, Sys_Req ]
    };
    key <SCLK> {    [  Scroll_Lock      ]   };
    key <PAUS> {
    type= "PC_CONTROL_LEVEL2",
    symbols[Group1]= [ Pause, Break ]
    };
    key  <INS> {    [  Insert       ]   };
    key <HOME> {    [  Home         ]   };
    key <PGUP> {    [  Prior        ]   };
    key <DELE> {    [  Delete       ]   };
    key  <END> {    [  End          ]   };
    key <PGDN> {    [  Next         ]   };

    key   <UP> {    [  Up           ]   };
    key <LEFT> {    [  Left         ]   };
    key <DOWN> {    [  Down         ]   };
    key <RGHT> {    [  Right        ]   };
};

引文:Bekir Aydoğan / Youtuberhttps://www.youtube.com/watch?v=uRFBKXeBlR4

相关内容