Solution 2 (probably better)

I was happy with solution 1, until I realized I couldn't use the key bindings in IntelliJ, which is a big bummer. Eventually I figured out that I could just use xmodmap and xcape to do the job, while still being able to use them in IntelliJ!

  • Step 1 (mapping caps_lock + hjkl): Create a file (say "~/.xmodmap") with the following content:
keycode 66 = Mode_switch
keysym h = h H Left
keysym l = l L Right
keysym k = k K Up
keysym j = j J Down
keysym u = u U Prior
keysym i = i I Home
keysym o = o O End
keysym p = p P Next

Feel free to skip the last 4 lines. I pasted them because they might be useful to you as well. In fact I'm really hoping to get the caps_lock enhancement working in Linux.

Then, run xmodmap ~/.xmodmap.

  • Step 2 (caps_lock as escape): Run xcape -e 'Mode_switch=Escape'.

  • Step 3 (optional): To avoid manually applying the keybindings, put the above 2 commands into your /etc/profile.

make capslock+hjkl as arrows的更多相关文章

  1. linux vi hjkl由来

    很远原因来自历史 I was reading about vim the other day and found out why it used hjkl keys as arrow keys. Wh ...

  2. [LeetCode] Minimum Number of Arrows to Burst Balloons 最少数量的箭引爆气球

    There are a number of spherical balloons spread in two-dimensional space. For each balloon, provided ...

  3. Win 通过修改注册表把CapsLock映射为Rshift

    成品: REGEDIT4     [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout] "Scancod ...

  4. 解决在CAPSLOCK开启情况下sendkeys大小写异常的问题

    http://files.cnblogs.com/files/liuzhaoyzz/sendkeys%E5%A4%A7%E5%B0%8F%E5%86%99.rar 首先利用GetKeyState(vb ...

  5. 在win7下将CapsLock按键变成esc

    我喜欢用vim来编辑,经常要按到esc,但是去按那个按键确实比较的远,而且CapsLock这个按键对我来说着实有些鸡肋,所以就想在win7上也能像ubuntu那样把capslock映射为esc,在网上 ...

  6. [LeetCode] 452 Minimum Number of Arrows to Burst Balloons

    There are a number of spherical balloons spread in two-dimensional space. For each balloon, provided ...

  7. C++自定义修饰键,实现如<Capslock+J>等组合键的按键映射

    前:所谓修饰键,就是Ctrl,Alt,Shift,Win这些按键. Update: 我使用AHK写了一个功能更丰富的脚本:https://github.com/h46incon/ModifierCus ...

  8. Leetcode: Minimum Number of Arrows to Burst Balloons

    There are a number of spherical balloons spread in two-dimensional space. For each balloon, provided ...

  9. 452. Minimum Number of Arrows to Burst Balloons——排序+贪心算法

    There are a number of spherical balloons spread in two-dimensional space. For each balloon, provided ...

随机推荐

  1. 解决 warning I tensorflow/core/platform/cpu_feature_guard.cc:141] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2

    只需要加载如下代码: import os os.environ['

  2. SQL SERVER 基本操作语句

    Sql 是一种结构化的查询语言:Sql是一种数据库查询和程序设计语言,用于存取数据以及查询.更新和管理‘关系型数据库’系统:Sql对大小写不敏感:Sql不是数据库,是行业标准,是结构化的查询语言 In ...

  3. tfs权限设置

    需求,管理员用户可以看到tfs里面的所有项目,现在需要给某个开发人员设置权限,只让其看到其中某一个项目. 一.tfs服务器设置 1.在服务器管理器中的[本地用户和组]中添加一个新用户,并在“组”将新用 ...

  4. 安卓demo

    https://github.com/Blankj/AndroidUtilCode/blob/master/utilcode/README-CN.md

  5. 2019.04.21 python核心特征

    本阶段我们将了解Python是如何管理内存的,学习内存管理让我们掌握python的运行机制: 并且在python中有许多函数式编程的特性,比如闭包,装饰器和生成器,这些都是一些比较难掌握的概念,但面试 ...

  6. php 解密小程序获取unionid

    小程序代码 php代码 public function login2() { $post = input(); if (!empty($post)) { $appid = $this->wxap ...

  7. Json数据产生树形结构

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <hea ...

  8. Vue系列之 => webpack的url loader

    安装: npm i url-loader file-loader -D  //url-loader内部依赖file-loader webpack.config.js const path = requ ...

  9. 比NGINX更快:nginx-1.15.5 vs mongols-1.2.3

    nginx是多进程web服务器的优秀代表. 本文要用mongols-1.2.3实现一个比nginx更快的多进程的web服务器. mongols是C++ 服务器基础设施库, 它的主要特性如下: tcp ...

  10. Centos7 下yum安装mysql