make capslock+hjkl as arrows
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的更多相关文章
- linux vi hjkl由来
很远原因来自历史 I was reading about vim the other day and found out why it used hjkl keys as arrow keys. Wh ...
- [LeetCode] Minimum Number of Arrows to Burst Balloons 最少数量的箭引爆气球
There are a number of spherical balloons spread in two-dimensional space. For each balloon, provided ...
- Win 通过修改注册表把CapsLock映射为Rshift
成品: REGEDIT4 [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout] "Scancod ...
- 解决在CAPSLOCK开启情况下sendkeys大小写异常的问题
http://files.cnblogs.com/files/liuzhaoyzz/sendkeys%E5%A4%A7%E5%B0%8F%E5%86%99.rar 首先利用GetKeyState(vb ...
- 在win7下将CapsLock按键变成esc
我喜欢用vim来编辑,经常要按到esc,但是去按那个按键确实比较的远,而且CapsLock这个按键对我来说着实有些鸡肋,所以就想在win7上也能像ubuntu那样把capslock映射为esc,在网上 ...
- [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 ...
- C++自定义修饰键,实现如<Capslock+J>等组合键的按键映射
前:所谓修饰键,就是Ctrl,Alt,Shift,Win这些按键. Update: 我使用AHK写了一个功能更丰富的脚本:https://github.com/h46incon/ModifierCus ...
- Leetcode: Minimum Number of Arrows to Burst Balloons
There are a number of spherical balloons spread in two-dimensional space. For each balloon, provided ...
- 452. Minimum Number of Arrows to Burst Balloons——排序+贪心算法
There are a number of spherical balloons spread in two-dimensional space. For each balloon, provided ...
随机推荐
- ajax 未加载出数据时,显示loding,数据显示后,隐藏loading
$("#CreateReport").click(function () { // RptID,Template,TemplateType,FileName var RptID = ...
- 手动实现一个list的常用功能
package com.pcxm.list; /** * 手动实现一个list * MyList * @description TODO * @author zhoum * @date 2018年5月 ...
- JAVA学习笔记 (okHttp3的用法)
最近的项目中有个接口是返回文件流数据,根据我们这边一个验签的插件,我发现里面有okHttpClient提供了Call.Factory,所以就学习了下okHttp3的用法. 1.概述 okhttp是一个 ...
- 前端 CSS语法
每个CSS样式由两个组成部分: 1.选择器 2.声明 声明由属性和值组成,每个声明之后用分号结束.
- ADB——连接手机的三种方式
有USB连接 硬件状态正常. 包括 Android 设备处于正常开机状态,USB 连接线和各种接口完好. Android 设备的开发者选项和 USB 调试模式已开启. 可以到「设置」-「开发者选项」- ...
- #学号 20175201张驰 《Java程序设计》第2周学习总结
教材学习内容总结: 一.第二章: 1:标识符与关键字 2:基本数据类型:四种整数类型(byte.short.int.long).两种浮点数类型(float.double).一种字符类型(char).一 ...
- Scala中foldLeft的总结
源码分析 def seq: TraversableOnce[A] 上面两段代码是scala.collection.TraversableOnce特质的foldLeft方法源代码,实现了Traversa ...
- vue中$refs、$slot、$nextTick相关的语法
Vue 实例还暴露了一些有用的实例属性与方法.它们都有前缀 $,以便与用户定义的属性区分开来 1.$data和$el var data = { a: 1 } var vm = new Vue({ el ...
- tp5命令行
手册->命令行->自定义命令行 1.第一步,配置command.php文件 2.第二步,建立命令类文件 注意:该文件中代码,从文档中粘,以防写错. 名字啥的都不用改,就改命名空间 和 定义 ...
- MATLAB多项式运算
序言 none 正文 1. 多项式的表示 在Matlab中,多项式用一个行向量表示, 行向量的元素值为多项式系数按幂次的降序排列, 如p(x)=x3-2x-5用P=[1,0,-2,-5]表示. 2. ...