关于组合快捷键, 想通过 Alt + j k l i 控制光标 左下右上 移动, 有什么好的方案?

2018-12-07 17:39:28 +08:00
 ainpy

用的 ide 是 phpstorm

vim 的移动光标是 h j k l

但是经常打游戏,习惯了 wasd jkli 这种操作方式

想通过 Alt+jkli 操作 上 下 左 右

ide 内是否能实现? 不能话还有什么方案? 可编程键盘能否实现?推荐一款

不怕大家笑话, 我现在 台式机 开发,用的普通的办公键盘,写大量代码的时候,把鼠标放到码字区的下边,这样的话用到鼠标的时候右手往下移一下就可以够到鼠标了,类似笔记本的触控。

1977 次点击
所在节点    问与答
6 条回复
CrownLeo
2018-12-07 17:44:04 +08:00
window 上用 autohotkey
mac 用那个叫 keyelement 什么的,具体的名字不记得了
NonClockworkChen
2018-12-07 17:50:55 +08:00
autohotkey 贼好用,我最近正在把 mac 和 windows 的快键键统一起来- -
DaPanda
2018-12-07 18:10:07 +08:00
试试 capslock+
noe132
2018-12-07 19:04:22 +08:00
autohotkey

; ---------- arrow keys ----------
; alt
<!i::Send, {Up}
<!k::Send, {Down}
<!j::Send, {Left}
<!l::Send, {Right}

; alt-ctrl
^<!i::Send, ^{Up}
^<!k::Send, ^{Down}
^<!j::Send, ^{Left}
^<!l::Send, ^{Right}

; alt-shift
+<!i::Send, +{Up}
+<!k::Send, +{Down}
+<!j::Send, +{Left}
+<!l::Send, +{Right}

; alt-ctrl-shift
+^<!i::Send, +^{Up}
+^<!k::Send, +^{Down}
+^<!j::Send, +^{Left}
+^<!l::Send, +^{Right}
xujinkai
2018-12-07 20:06:55 +08:00
又到了给自己写的软件打广告的时间

https://onequick.org/
Goooogle
2018-12-07 20:14:22 +08:00
macOS karabiner-element
` + HJKL 输出方向键

{
"description": "(Arrow) Grave + HJKL to arrow keys",
"manipulators": [
{
"from": {
"key_code": "grave_accent_and_tilde"
},
"to": [
{
"set_variable": {
"name": "grave_pressed",
"value": 1
}
}
],
"to_after_key_up": [
{
"set_variable": {
"name": "grave_pressed",
"value": 0
}
}
],
"to_if_alone": [
{
"key_code": "grave_accent_and_tilde"
}
],
"type": "basic"
},
{
"conditions": [
{
"name": "grave_pressed",
"type": "variable_if",
"value": 1
}
],
"from": {
"key_code": "h"
},
"to": [
{
"key_code": "left_arrow"
}
],
"type": "basic"
},
{
"conditions": [
{
"name": "grave_pressed",
"type": "variable_if",
"value": 1
}
],
"from": {
"key_code": "j"
},
"to": [
{
"key_code": "down_arrow"
}
],
"type": "basic"
},
{
"conditions": [
{
"name": "grave_pressed",
"type": "variable_if",
"value": 1
}
],
"from": {
"key_code": "k"
},
"to": [
{
"key_code": "up_arrow"
}
],
"type": "basic"
},
{
"conditions": [
{
"name": "grave_pressed",
"type": "variable_if",
"value": 1
}
],
"from": {
"key_code": "l"
},
"to": [
{
"key_code": "right_arrow"
}
],
"type": "basic"
}
]
}

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/515439

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX