오토 핫키가 가장 간단한 솔루션입니다. 키보드에 맞는 매핑을 찾는 데 시간이 걸렸으며 공유하기에 좋은 장소라고 생각했습니다. CTRL과 SHIFT 조합을 보여 주신 Ilan 에게 감사드립니다 .
내 Dell Precision 7510 랩탑에는 전용 홈 및 종료 버튼이 없지만 전용 PrtScr 및 삽입 버튼 ( 예 :) 이 있습니다. 일반적으로 외장 키보드를 사용하고 정기적으로 인쇄 화면 키 를 사용하기 때문에 랩톱 키보드를 사용할 때 해당 화면을 인쇄 화면 과 홈 으로 전환하는 방법이 필요했습니다 . Iian 의 예제를 바탕으로 Win + Print Screen 을 설정 하여 재정의 를 토글 합니다.
; My Dell Precision 7510 laptop does not have dedicated Home and End buttons
; but it does have dedicated PrtScr and Insert buttons.
; This script will override those buttons as Home and End.
; Idea from: http://superuser.com/questions/412761/mini-keyboard-has-no-home-end-keys-how-to-type-them
; Use the Win+Printscreen key to toggle these hotkeys. They are only needed when using the laptop keyboard.
; Note that this script should be loaded after Snagit or other software that overrides the Print Screen key or those programs may fail to map properly.
#Printscreen::
T:=!T
if(T) ; If it's on
{
;--- Map the Printscreen and Insert keys ---
Hotkey, Printscreen, Printscreen, On
Hotkey, Insert, Insert, On
SoundBeep 423, 100
SoundBeep 423, 150
ToolTip, Laptop PrtScr/Insert remapped to Home/End...
Sleep, 1500
ToolTip
;=== Home ===
; Note that MsgBox, ToolTip, and SoundBeep lines are not executing after the first key is mapped. Hmm. BS 7/27/2016
; Home = start of line
Printscreen::Send {Home}
; Ctrl-Home = start of document
^Printscreen::Send {LCtrl down}{Home}{LCtrl up}
; Shift-Home = select to start of line
+Printscreen::Send {LShift down}{Home}{LShift up}
; Ctrl-Shift-Home = select to start of document
^+Printscreen::Send {LCtrl down}{LShift down}{Home}{LShift up}{LCtrl up}
;=== End ===
; End = end of line
Insert::Send {End}
; Ctrl-End = end of document
^Insert::Send {LCtrl down}{End}{LCtrl up}
; Shift-End = select to end of line
+Insert::Send {LShift down}{End}{LShift up}
; Ctrl-Shift-End = select to start of document
^+Insert::Send {LCtrl down}{LShift down}{End}{LShift up}{LCtrl up}
}
else
{
;--- Disable the Printscreen and Insert key mapping ---
Hotkey, Printscreen, Off
Hotkey, Insert, Off
SoundBeep 303, 150
ToolTip, Laptop PrtScr/Insert remapping disabled...
Sleep, 1500
ToolTip
}
Return