Last active
March 14, 2024 14:46
-
-
Save empathicqubit/96e203ac8c885f224bef937c9c0a6b2f to your computer and use it in GitHub Desktop.
Semi-universal mirrorboard script. Mirrors layout when space is pressed in combination with keys
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; Mirrors the left ten "columns" of keys on the keyboard when holding down space. | |
; So for the first row, 1 becomes 0, 2 becomes 9, and so on. It does this for | |
; all four rows: home, top, bottom, and number. This should work with any layout, | |
; theoretically. This layout is based on https://github.com/empathicqubit/mirrorboard-mac | |
; My layout varies slightly from Qubist's by only mirroring the number row over the hands, | |
; So the two keys to the right of the number row are not included. This is to preserve the | |
; hand symmetry better, at the cost of not being able to use some of the symbols on the | |
; right hand side of the keyboard without reaching. This could be a problem if you're | |
; coding or something. I think that you probably shouldn't try to code with this, but if | |
; you do, use your rìght hand. | |
; | |
; Caps Lock becomes enter/return. | |
; Tab becomes /?, regardless of language. This would be a good key to remap if you | |
; find that something is missing from the right hand side of the keyboard. | |
; Enter/return becomes tab. | |
; | |
; The key to the left of 1 becomes backspace, and vice versa. | |
;OPTIMIZATIONS START | |
#NoEnv | |
#MaxHotkeysPerInterval 99000000 | |
#HotkeyInterval 99000000 | |
#KeyHistory 10 | |
ListLines Off | |
Process, Priority, , A | |
SetBatchLines, -1 | |
SetKeyDelay, -1, -1 | |
SetMouseDelay, -1 | |
SetDefaultMouseSpeed, 0 | |
SetWinDelay, -1 | |
SetControlDelay, -1 | |
SendMode Input | |
DllCall("ntdll\ZwSetTimerResolution","Int",5000,"Int",1,"Int*",MyCurrentTimerResolution) ;setting the Windows Timer Resolution to 0.5ms, THIS IS A GLOBAL CHANGE | |
;OPTIMIZATIONS END | |
mirror := False | |
sp := False | |
#If (mirror) | |
*Space Up:: | |
mirror := False | |
if (sp) { | |
Send {Blind}{Space} | |
} | |
return | |
; Misc keys | |
*SC029:: | |
Send {Blind}{SC00E} ; Tick -> Backspace | |
sp := False | |
return | |
*SC00E:: | |
Send {Blind}{SC029} ; Backspace -> Tick | |
sp := False | |
return | |
+SC00F:: | |
Send ? ; Shift+Tab -> ? | |
sp := False | |
return | |
*SC00F:: | |
Send {Blind}/ ; Tab -> / | |
sp := False | |
return | |
*SC01C:: | |
Send {Blind}{SC00F} ; Return -> Tab | |
sp := False | |
return | |
*SC066:: | |
*SC03A:: | |
Send {Blind}{SC01C} ; Caps -> Return | |
sp := False | |
return | |
; First row, numbers | |
*SC002:: | |
Send {Blind}{SC00B} ; 1 -> 0 | |
sp := False | |
return | |
*SC003:: | |
Send {Blind}{SC00A} ; 2 -> 9 | |
sp := False | |
return | |
*SC004:: | |
Send {Blind}{SC009} ; 3 -> 8 | |
sp := False | |
return | |
*SC005:: | |
Send {Blind}{SC008} ; 4 -> 7 | |
sp := False | |
return | |
*SC006:: | |
Send {Blind}{SC007} ; 5 -> 6 | |
sp := False | |
return | |
*SC007:: | |
Send {Blind}{SC006} ; 6 -> 5 | |
sp := False | |
return | |
*SC008:: | |
Send {Blind}{SC005} ; 7 -> 4 | |
sp := False | |
return | |
*SC009:: | |
Send {Blind}{SC004} ; 8 -> 3 | |
sp := False | |
return | |
*SC00A:: | |
Send {Blind}{SC003} ; 9 -> 2 | |
sp := False | |
return | |
*SC00B:: | |
Send {Blind}{SC002} ; 0 -> 1 | |
sp := False | |
return | |
; Second row, top character row | |
*SC010:: | |
Send {Blind}{SC019} | |
sp := False | |
return | |
*SC011:: | |
Send {Blind}{SC018} | |
sp := False | |
return | |
*SC012:: | |
Send {Blind}{SC017} | |
sp := False | |
return | |
*SC013:: | |
Send {Blind}{SC016} | |
sp := False | |
return | |
*SC014:: | |
Send {Blind}{SC015} | |
sp := False | |
return | |
*SC015:: | |
Send {Blind}{SC014} | |
sp := False | |
return | |
*SC016:: | |
Send {Blind}{SC013} | |
sp := False | |
return | |
*SC017:: | |
Send {Blind}{SC012} | |
sp := False | |
return | |
*SC018:: | |
Send {Blind}{SC011} | |
sp := False | |
return | |
*SC019:: | |
Send {Blind}{SC010} | |
sp := False | |
return | |
; Third row, main character row, "home" row | |
*SC01E:: | |
Send {Blind}{SC027} | |
sp := False | |
return | |
*SC01F:: | |
Send {Blind}{SC026} | |
sp := False | |
return | |
*SC020:: | |
Send {Blind}{SC025} | |
sp := False | |
return | |
*SC021:: | |
Send {Blind}{SC024} | |
sp := False | |
return | |
*SC022:: | |
Send {Blind}{SC023} | |
sp := False | |
return | |
*SC023:: | |
Send {Blind}{SC022} | |
sp := False | |
return | |
*SC024:: | |
Send {Blind}{SC021} | |
sp := False | |
return | |
*SC025:: | |
Send {Blind}{SC020} | |
sp := False | |
return | |
*SC026:: | |
Send {Blind}{SC01F} | |
sp := False | |
return | |
*SC027:: | |
Send {Blind}{SC01E} | |
sp := False | |
return | |
; Fourth row, bottom character row | |
*SC02C:: | |
Send {Blind}{SC035} | |
sp := False | |
return | |
*SC02D:: | |
Send {Blind}{SC034} | |
sp := False | |
return | |
*SC02E:: | |
Send {Blind}{SC033} | |
sp := False | |
return | |
*SC02F:: | |
Send {Blind}{SC032} | |
sp := False | |
return | |
*SC030:: | |
Send {Blind}{SC031} | |
sp := False | |
return | |
*SC031:: | |
Send {Blind}{SC030} | |
sp := False | |
return | |
*SC032:: | |
Send {Blind}{SC02F} | |
sp := False | |
return | |
*SC033:: | |
Send {Blind}{SC02E} | |
sp := False | |
return | |
*SC034:: | |
Send {Blind}{SC02D} | |
sp := False | |
return | |
*SC035:: | |
Send {Blind}{SC02C} | |
sp := False | |
return | |
#If | |
#If (!mirror) | |
*Space:: | |
mirror := True | |
sp := True | |
return | |
SC03A::return | |
#If |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment