问题描述
由于疯狂的笔记本电脑键盘布局以及无法映射Fn组合,我想进行一些重新映射.我想使用LWin键作为修饰符(例如LWin + Right ==> End等).效果很好.
Because of an insane laptop keyboard layout and the inability to map Fn-combinations I want to do a few remappings. I would like to use the LWin key as modifier (such as LWin+Right ==> End, etc.). It works just fine.
但是,我想停止LWin(当单独按下并释放时)以显示Windows菜单(b/c有时我按下修改器,但随后决定不完成该操作)和仍然希望能够相当容易地访问Windows菜单,例如通过LAlt + LWin. (显然,LWin必须充当适当的修饰符.)
However, I want to stop LWin, when pressed and released alone, to bring up the Windows menu (b/c I sometimes press the modifier but then decide not to complete the action) and I still want to be able to access the Windows menu fairly easily, say via LAlt+LWin. (Obviously LWin must act as a proper modifier otherwise.)
所以我尝试了:
#LAlt::Send {LWin}
这有点奏效但很丑陋(需要在按住Alt键并释放的同时保持LWin的按下状态).反之,那就更自然了.
which kinda works but ugly (needs LWin kept pressed while Alt is pressed and released). It would be more natural the other way round, i.e.
!LWin::Send {LWin}
,但是它不起作用(即使使用$
或~
前缀也是如此).
but it doesn't work (not even with a $
or ~
prefix).
最糟糕的是,我无法成功地单独禁用LWin键 ,使得它仍然可以用作修饰符:
Worst of all I have had no success disabling the LWin key alone in such a way that it still works as a modifier:
LWin::Return
完全杀死它.
我是autohotkey的新手(我猜是很幸运的键盘;));解决这些问题的好方法是什么?
I'm new to autohotkey (have had luck with keyboards, I guess ;)); what's a good way to solve these?
更新:这是到目前为止我完整的热键文件:
Update: here is my hotkey file in full so far:
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
#Warn ; Enable warnings to assist with detecting common errors.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
#InstallKeybdHook
; Win + arrows
*#Right::Send {End}
*#Left::Send {Home}
*#Down::Send {PgDn}
*#Up::Send {PgUp}
; Sane CapsLock: make it Shift, Shift+CapsLock as CapsLock
CapsLock::Shift
+CapsLock::CapsLock
; Alt-Win to Win (so that Win menu is accessible still)
; and disable Win alone (so that it won't pop up with navigation)
;??????????????
推荐答案
这应该有效:
LWin up::return
<!Lwin::
send ^{Esc}
return
<#right::
send {end}
return
使用 + 代替可以解决问题.
Using + instead of here does the trick.
这篇关于Autohotkey:重新映射Win键-单独按下时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!