用alt键重新映射键vim风格。

时间:2022-12-08 23:17:42

I want to have vim style navigation by remapping Alt and h, j, k, l to emulate the arrow buttons.

我想要有vim风格的导航,通过重新映射Alt和h, j, k, l来模拟箭头按钮。

This is my AHK script:

这是我的AHK脚本:

!h::Left
!j::Down
!k::Up
!l::Right

The problem is that this script seems to send the Alt key along with the arrow key.

问题是这个脚本似乎发送了Alt键和箭头键。

Eg. When I press Alt+j then Alt+Down is sent by AHK.

如。当我按Alt+j时,Alt+向下是由AHK发送的。

What's wrong with my script?

我的脚本怎么了?

1 个解决方案

#1


3  

I'm not quite sure how your current code is being interpreted, but you can use the Send command to send special keys.

我不太清楚您当前的代码是如何被解释的,但是您可以使用Send命令来发送特殊的键。

!h::Send, {Left}
!j::Send, {Down}
!k::Send, {Up}
!l::Send, {Right}

#1


3  

I'm not quite sure how your current code is being interpreted, but you can use the Send command to send special keys.

我不太清楚您当前的代码是如何被解释的,但是您可以使用Send命令来发送特殊的键。

!h::Send, {Left}
!j::Send, {Down}
!k::Send, {Up}
!l::Send, {Right}