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 ...
随机推荐
-
java中的list时间排序
最初设想使用:时间long型 private void testTimes() throws InterruptedException{ Calendar cal=Calendar.getInstan ...
-
实现iOS图片等资源文件的热更新化(三):动态的资源文件夹
简介 此文,将尝试动态从某个不确定的文件夹中加载资源文件.文章,会继续完善自定义的 imageNamed 函数,并为下一篇文章铺垫. 这么做的意义 正如我们经常所说的那样,大多数情景知道做事的意义往往 ...
-
[deviceone开发]-模仿Zaker的示例
一.简介 这个示例模仿zaker这个App,主要的界面基本都完成,用到了各种deviceone提供的ui组件,比如GridView,ListView,ScrollView,ViewShower等等.初 ...
-
loadrunner 功能详解(一) - Run-time Settings
1.General / Run Logic Number of Iterations:说明的是反复循环的次数. 常境的时间中,如果时间设为5分钟,而实际上程序的运行只需要1分钟,而在这项中,选择的是 ...
-
移动APP服务端API设计应该考虑到的问题
2014年,移动APP的热度丝毫没有减退,并没有像桌面软件被WEB网站那样所取代, 不但如此,越来越多的传统应用.网站也都开始制作自己的移动APP,也就是我们常说的IOS客户端.android客户端. ...
-
学习手机游戏开发的两个方向 Cocos2d-x 和 Unity 3D/2D,哪个前景更好?
如题! 首先说一说学习手机游戏(移动游戏)这件事. 眼下移动互联网行业的在以井喷状态发展.全球几十亿人都持有智能终端设备(ios android),造就了非常多移动互联网创业机会: 一.移动社交 微信 ...
-
jQuery UI dialog 參数说明
前段时间碰到个问题 jquery UI dialog弹出层 弹出多个层是 比方弹出两个层A和B B层假设显示的数据表格太大,伸到了A层的外面,那伸到A层之外的部分就看不到了,由于B层是在A层上弹出的 ...
-
【redis源码阅读】redis对象
结构定义 在redis中,对象的数据结构定义如下: typedef struct redisObject { unsigned type:4; unsgined encoding:4; uns ...
-
python学习记录20190121
print 语句默认会给每一行添加一个换行符.只要在print 语句的最后添加一个逗号(,),就可以改变它这种行为 带逗号的print语句输出的元素之间会自动添加一个空格 print 没有任何参数的p ...
-
_npc
`entry`NPCid `id` 顺序id `action` enum('开始','说话','大喊','表情','移动','技能','结束'),NPC动作 `param1` 值1(说话 或者放技能) ...