Skip to content

Instantly share code, notes, and snippets.

@Sov3rain
Last active November 19, 2023 12:32
Show Gist options
  • Save Sov3rain/14478afa7d58300782cc1bae295e7a2c to your computer and use it in GitHub Desktop.
Save Sov3rain/14478afa7d58300782cc1bae295e7a2c to your computer and use it in GitHub Desktop.
AutoHotKey script to mimic the Space Cadet Keyboard shift features.
#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.
; Space Cadet Shift - If the shift key is tapped without being used to uppercase a key then it acts as a curly bracket key instead.
~LShift::
KeyWait, LShift
If (A_TimeSinceThisHotkey < 150 and A_PriorKey = "LShift") {
SendRaw, {
}
return
~RShift::
KeyWait, RShift
If (A_TimeSinceThisHotkey < 150 and A_PriorKey = "RShift") {
SendRaw, }
}
return
; Space Cadet Ctrl - If the control key is tapped without being used to uppercase a key then it acts as a bracket key instead.
~LControl::
KeyWait, LControl
If (A_TimeSinceThisHotkey < 150 and A_PriorKey = "LControl") {
SendRaw, [
}
return
~RControl::
KeyWait, RControl
If (A_TimeSinceThisHotkey < 150 and A_PriorKey = "RControl") {
SendRaw, ]
}
return
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment