code {margin: 0;padding: 0;font-size: 100%;word-break: normal;background: transparent;border: 0;}ol {list-style-type: decimal;}ol ol, ul ol {list-style-type: lower-latin;}ol ol ol, ul ol ol, ul ul ol, ol ul ol {list-style-type: lower-roman;}table {border-spacing: 0;border-collapse: collapse;margin-top: 0;margin-bottom: 16px;}table th {font-weight: bold;}table th, table td {padding: 6px 13px;border: 1px solid #ddd;}table tr {border-top: 1px solid #ccc;}table tr:nth-child(even) {background-color: #f8f8f8;}input[type="checkbox"] {cursor: default;margin-right: 0.5em;font-size: 13px;}.task-list-item {list-style-type: none;}.task-list-item+.task-list-item {margin-top: 3px;}.task-list-item input {float: left;margin: 0.3em 1em 0.25em -1.6em;vertical-align: middle;}#tag-field {margin: 8px 2px 10px;}#tag-field .tag {display: inline-block;background: #cadff3;border-radius: 4px;padding: 1px 8px;color: black;font-size: 12px;margin-right: 10px;line-height: 1.4;}
-->

.ace_line {padding-left: 2.6em;}.ace_static_highlight .ace_line {position: relative;}.ace_static_highlight .ace_gutter-cell {-moz-user-select: -moz-none;-khtml-user-select: none;-webkit-user-select: none;user-select: none;top: 0;bottom: 0;left: 0;position: absolute;}.ace_static_highlight .ace_gutter-cell:before {content: counter(ace_line, decimal);counter-increment: ace_line;}.ace_static_highlight {counter-reset: ace_line;}
-->
span {font-weight: normal !important;}.ace-github .ace_marker-layer .ace_step {background: rgb(252, 255, 0);}.ace-github .ace_marker-layer .ace_stack {background: rgb(164, 229, 101);}.ace-github .ace_marker-layer .ace_bracket {margin: -1px 0 0 -1px;border: 1px solid rgb(192, 192, 192);}.ace-github .ace_gutter-active-line {background-color : rgba(0, 0, 0, 0.07);}.ace-github .ace_marker-layer .ace_selected-word {background: rgb(250, 250, 255);border: 1px solid rgb(200, 200, 250);}.ace-github .ace_invisible {color: #BFBFBF}.ace-github .ace_print-margin {width: 1px;background: #e8e8e8;}.ace-github .ace_indent-guide {background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==") right repeat-y;}
-->



ubuntu修改键盘映射

在mac上用virtualbox 安装了ubuntu18.04 LTS。由于在mac上组合快捷键大多数用左Command而不是Ctrl,十分不适应。所以修改了ubuntu的键盘映射,交换左Ctrl和左Command键的功能。

环境

  • VirtualBox 5.2.12
  • ubuntu 18.04 LTS

操作步骤

  1. 编辑配置文件
$ sudo vi /usr/share/X11/xkb/symbols/pc
  1. 找到如下两条配置项
key <LCTL> { [ Control_L ] };
key <LWIN> { [ Super_L ] };
  1. 修改为
key <LCTL> { [ Super_L ] };
key <LWIN> { [ Control_L ] };
  1. 重启
sudo reboot now

参考
https://askubuntu.com/questions/131900/how-do-i-switch-the-command-key-and-control-key-on-a-macbook-pro

ubuntu修改键盘映射的更多相关文章

  1. Linux下修改键盘映射

    一篇关于修改键盘映射比较靠谱的文章,收藏一下! 原文地址:http://www.07net01.com/2016/04/1436249.html --------------------------- ...

  2. gentoo 修改键盘映射

    gentoo 上面修改键盘映射分为两种,一种是终端环境,一种是X环境. 终端环境 https://www.emacswiki.org/emacs/MovingTheCtrlKey https://wi ...

  3. Ubuntu 12.04 修改键盘映射

    背景: (1) 我的笔记本G450上,Page_up/Page_down键分别和Home/End在同一个键位上,需要同时按住Fn键才能敲出Home/End (2) 习惯用Vim的同志都有这个感觉,Es ...

  4. linux 下修改键盘映射

    参考文档 原因: 输入 键盘原本的 “\ |”,结果映射到 "< >",而 < 与 > 对应的键名分别是 less 与 greater 查看键名: xev ...

  5. Linux Windows 修改键盘映射

    Linux 下是编辑 ~/.Xmodmap 文件 remove Lock = Caps_Lockkeysym Escape = Caps_Lockkeysym Caps_Lock = Escapead ...

  6. ubuntu键盘映射

    在sublime下开发习惯把CapsLock和Shift间交换,windows下有很多软件可以修改键盘映射,在ubuntu下可以是哦用xmodmap命令,使用方法如下: 在自己用户的home目录下新建 ...

  7. windows系统下修改键盘按键的映射

    待解决的问题: 在windows系统下,在某些情况下,我们感觉键盘的按键位置不是特别方便,因此想重新映射它. 比如:要实现如下重新映射(我就有这样的需求),怎么办? Esc键 修改为 CapsLock ...

  8. ubuntu修改capslock键,单独使用为esc,组合使用时为ctrl+

    一.下面这部分可以将capslock与ctrl互换 将下面的代码放入-/.Xmodmap中, remove Lock = Caps_Lock remove Control = Control_L ke ...

  9. ubuntu下Xmodmap映射Esc和Ctrl_L

    一般来说,用Vim.Emacs的人,都会有做键盘映射的想法 我当然也是,开始学习Vim的时候,就觉得,把Esc键放在左上角, 是一件很SB的事情,稍微大一点的键盘,手指必须要离开位置才能按到Esc键, ...

随机推荐

  1. python自定义库文件路径

    各有各的小烦恼,各有的小期待 这是人家私事,不要大嘴巴 在Pycharm中import whois时,总是失败 原因是安装了python3.x相关操作过程,将环境变量path中关于Python的配置c ...

  2. 由HashMap哈希算法引出的求余%和与运算&转换问题

    1.引出问题 在前面讲解HashMap 的源码实现时,有如下几点: ①.初始容量为 1<<4,也就是24 = 16 ②.负载因子是0.75,当存入HashMap的元素占比超过整个容量的75 ...

  3. C#中的is和as

    is检查一个对象是否兼容于指定的类型,不返回Boolean值.注意is操作符永远不会抛异常.is操作符通常这样使用: if(o is Employee) { Employee e=(Employee) ...

  4. 进击Node.js基础(二)promise

    一.Promise—Promise似乎是ES6中的规范 PROMISE的语言标准,PROMISE/A+规范,如何使用,在什么场景下使用 Promise时JS对异步操作场景提出的解决方案(回调,观察者模 ...

  5. python 产生token及token验证

    1.前言 最近在做微信公众号开发在进行网页授权时,微信需要用户自己在授权url中带上一个类似token的state的参数,以防止跨站攻击.在经过再三思考之后,自己试着实现一个产生token和验证tok ...

  6. js算法初窥04(算法模式01-递归)

    终于来到了有点意思的地方--递归,在我最开始学习js的时候,基础课程的内容就包括递归,但是当时并不知道递归的真正意义和用处.我只是知道,哦...递归是自身调用自身,递归要记得有一个停止调用的条件.那时 ...

  7. QM5_Didstribution

    Basic Concepts Probability distribution Discrete distribution (离散分布) The distribution of the discret ...

  8. BZOJ_1834_[ZJOI2010]network 网络扩容_费用流

    BZOJ_1834_[ZJOI2010]network 网络扩容_费用流 题意: 给定一张有向图,每条边都有一个容量C和一个扩容费用W.这里扩容费用是指将容量扩大1所需的费用. 求:  1.在不扩容的 ...

  9. BZOJ_5296_[Cqoi2018]破解D-H协议_BSGS

    BZOJ_5296_[Cqoi2018]破解D-H协议_BSGS Description Diffie-Hellman密钥交换协议是一种简单有效的密钥交换方法.它可以让通讯双方在没有事先约定密钥(密码 ...

  10. AngularJs parent index

    AngualrJs ng-repeat使用 $parent.$index 当时用ng-repeat的时候在其子原属中可以使用$parent.$index获取父级下标,当没有没有多一级的ng-if,一般 ...