문제

I wanted to program some of the Fnn and shift-Fnn keys, and clear the rest of them from what windows had assigned them. Just long enough to run a telnet or putty session, then I want to let them revert back to win std. I used a script in AutoHotkey, and it works mostly, but I assigned the many unused keys to be SHIFT keys, and now the shift-F4 often burps out the unshifted F4 string {over half the time I hit it.} Is there some better way to nuke the windows presets than just slapping SHIFT on all those keys, or is there some obscure tweak I can make to the script to lighten the load on the SHIFT kbd hook? Script follows; note there's lotsa trailing spaces on most lines, if it matters... Tested on a win8 laptop and an XP tabletop, same results.

#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.
SetWorkingDir C:\bin  ; Ensures a consistent starting directory.
F1::send, EX`r 
F2::Shift         
F3::Shift      
F4::send, FI`r    
F5::Shift       
F6::Shift  
F7::Shift       
F8::Shift     
F9::send, OFF`r   
F10::send, PROD  
F11::send, `r  
F12::send, END`r 
+F1::send, FD   
+F2::Shift   
+F3::Shift   
+F4::send,  EM5 
+F5::Shift        
+F6::Shift  
+F7::Shift    
+F8::Shift    
+F9::send, `r  
+F10::send, PYR`r 
+F11::send, SYSP 
+F12::Shift   
^F12::ExitApp  ; control-F12 will remove all these
$~CapsLock Up::SetCapsLockState Off  ; regress capslock to a SHIFT
도움이 되었습니까?

해결책

Having tried a similar thing to "disable" Windows hold on the WIN key, I found that there wasn't a way to disable all of them - only a few.

However, Autohotkey can override windows hotkeys, as you've found.

If you just want to disable Windows' use of those keys (if I'm understanding you correctly), you could try something like this:

F11::
F12::
return

That would effectively disable the use of F11 and F12 anywhere as long as the script was running.

(no, trailing spaces don't make any difference)

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top