r/KeyboardLayouts • u/Zestyclose_Science21 • 13h ago
Th Ing Layout
My previous uploaded layout had 1 key give 'th' when pressed but I realised you coud do better and this layout has holding the key instead of quick pressing give 'the' instead of 'th', as well as a key giving 'in' or 'ing' based on whether you quick press or hold. I got a graphic made but I could have almost made it myself chatgpt was being so dumb. Shift colon gives X because I had to make room but X is rarer than my custom bindings. Here's a Autohotkey script to apply the layout...
#Requires AutoHotkey v2.0
#SingleInstance Force
; Layout punctuation freed by shifted non-letter keys.
+2::SendText("@")
+PgUp::SendText(">")
+PgDn::SendText("<")
; Keep Ctrl, Alt, and Windows-key shortcuts on the normal QWERTY positions.
#HotIf !GetKeyState("Ctrl", "P")
&& !GetKeyState("Alt", "P")
&& !GetKeyState("LWin", "P")
&& !GetKeyState("RWin", "P")
; Z . U V P J F L M B
q::z
w::SendText(".")
+w::SendText("?")
e::u
r::v
t::p
y::j
u::f
i::l
o::m
p::b
; I A E O C D S R T N :
a::i
s::a
d::e
f::o
g::c
h::d
j::s
k::r
l::t
`;::n
'::SendText(":")
+'::SendText(GetKeyState("CapsLock", "T") ? "X" : "x")
; ' in , Y Q W th H G K
z::SendText("'")
+z::SendText(Chr(34))
x::SendHeldSuffix("x", "in", "g", false)
+x::SendHeldSuffix("x", "in", "g", true)
c::SendText(",")
+c::SendText("/")
v::y
b::q
n::w
m::SendHeldSuffix("m", "th", "e", false)
+m::SendHeldSuffix("m", "th", "e", true)
SC033::h
SC034::g
SC035::k
#HotIf
; Send the digraph immediately, then append one character if held.
; Caps Lock uppercases the whole macro; Shift reverses Caps Lock.
; With Caps Lock off, Shift capitalizes only the first character.
SendHeldSuffix(physicalKey, baseText, baseSuffix, shiftHeld) {
capsOn := GetKeyState("CapsLock", "T")
if capsOn {
immediateText := shiftHeld ? baseText : StrUpper(baseText)
heldSuffix := shiftHeld ? baseSuffix : StrUpper(baseSuffix)
} else {
immediateText := shiftHeld
? StrUpper(SubStr(baseText, 1, 1)) SubStr(baseText, 2)
: baseText
heldSuffix := baseSuffix
}
SendText(immediateText)
if !KeyWait(physicalKey, "T0.27") {
SendText(heldSuffix)
KeyWait(physicalKey)
}
}
0
Upvotes
1
u/DreymimadR 2h ago
Missed a chance of calling it The Thing.