AutoHotkey es la solución más simple para esto. Me tomó un tiempo encontrar el mapeo adecuado para mi teclado y pensé que este era un buen lugar para compartirlo. (Gracias, Ilan, por mostrar las combinaciones CTRL y SHIFT).
Mi portátil Dell Precision 7510 no tiene botones dedicados de inicio y finalización, pero sí tiene botones dedicados PrtScr e Insertar ( como este ). Como normalmente uso un teclado externo y uso regularmente la tecla Imprimir pantalla, necesitaba una forma de alternar ese botón entre Imprimir pantalla y Inicio cuando uso el teclado del portátil. Partiendo del ejemplo de Iian , configuré Win + Print Screen para alternar la anulación.
; 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