Skip to content

Instantly share code, notes, and snippets.

@volks73
volks73 / AutoHotkey.ahk
Created September 26, 2017 14:47
AutoHotkey script to change Caps Lock to Control on hold and Escape on press and release
; Change Caps Lock to Control when held down; otherwise, Escape
;
; Originally based on the answer provided in
; [this](https://superuser.com/questions/581692/remap-caps-lock-in-windows-escape-and-control)
; StackExchange SuperUser question.
;
; A shortcut should be created for this script and placed in the Windows 10
; user's startup folder to automatically enable the feature on boot/startup.
; The user's startup folder can be found using the following steps:
;
@ronkorving
ronkorving / GetSystemLanguage.mm
Created January 28, 2015 07:20
Extracting iOS system language for Unity in Assets/Plugins/iOS/GetSystemLanguage.mm
#include "UnityAppController.h"
/*
* This Plug in will set a "systemLanguage" string key in PlayerPrefs with the system language code.
*/
@interface GetSystemLanguage : UnityAppController
@end
@implementation GetSystemLanguage
@sedm0784
sedm0784 / CapsLockCtrlEscape.ahk
Last active March 14, 2025 04:21
AutoHotkey script to map Caps Lock to Escape when it's pressed on its own and Ctrl when used in combination with another key, à la Steve Losh. Adapted from one that does something similar with the Ctrl Key on the Vim Tips Wiki (http://vim.wikia.com/wiki/Map_caps_lock_to_escape_in_Windows?oldid=32281). (Plus contribs from @randy909 & @mmikeww.)
g_LastCtrlKeyDownTime := 0
g_AbortSendEsc := false
g_ControlRepeatDetected := false
*CapsLock::
if (g_ControlRepeatDetected)
{
return
}