DonationCoder.com Software > Post New Requests Here
IDEA holding down key to give Capital Letter
(1/1)
willwilliams:
Hi,
Love this site!
It's rather nice on the Blackberry to be able to get a capital letter just by holding a key down for a little longer than usual. And since I nnnnnnnnnnever nnnnnnnnneed to be able to get multiples of a letter, which is what holding a key down gets me at the moment, might be fun to have it on a PC, too.
Regards
Will
togikun:
This is not a very elegant solution, but it does the job.
--- ---;
; Author: Togi <[email protected]>
;
#NoEnv
SendMode Input
KeyIsDown = 0
UpperDelay = 700
UpperDelay *= -1
return
KeyDown(key)
{
global KeyIsDown
global LastKey
if (KeyIsDown < 1 or key <> LastKey)
{
KeyIsDown := true
LastKey := key
Send %key%
SetKeyDelay, 65535
SetTimer, ReplaceWithUpper, %UpperDelay%
}
return
}
KeyUp(key)
{
global KeyIsDown
global LastKey
SetTimer, ReplaceWithUpper, Off
KeyIsDown := false
return
}
ReplaceWithUpper:
SetKeyDelay, -1
Send {Backspace}+%LastKey%
return
a:: KeyDown("a")
b:: KeyDown("b")
c:: KeyDown("c")
d:: KeyDown("d")
e:: KeyDown("e")
f:: KeyDown("f")
g:: KeyDown("g")
h:: KeyDown("h")
i:: KeyDown("i")
j:: KeyDown("j")
k:: KeyDown("k")
l:: KeyDown("l")
m:: KeyDown("m")
n:: KeyDown("n")
o:: KeyDown("o")
p:: KeyDown("p")
q:: KeyDown("q")
r:: KeyDown("r")
s:: KeyDown("s")
t:: KeyDown("t")
u:: KeyDown("u")
v:: KeyDown("v")
w:: KeyDown("w")
x:: KeyDown("x")
y:: KeyDown("y")
z:: KeyDown("z")
a Up:: KeyUp("a")
b Up:: KeyUp("b")
c Up:: KeyUp("c")
d Up:: KeyUp("d")
e Up:: KeyUp("e")
f Up:: KeyUp("f")
g Up:: KeyUp("g")
h Up:: KeyUp("h")
i Up:: KeyUp("i")
j Up:: KeyUp("j")
k Up:: KeyUp("k")
l Up:: KeyUp("l")
m Up:: KeyUp("m")
n Up:: KeyUp("n")
o Up:: KeyUp("o")
p Up:: KeyUp("p")
q Up:: KeyUp("q")
r Up:: KeyUp("r")
s Up:: KeyUp("s")
t Up:: KeyUp("t")
u Up:: KeyUp("u")
v Up:: KeyUp("v")
w Up:: KeyUp("w")
x Up:: KeyUp("x")
y Up:: KeyUp("y")
z Up:: KeyUp("z")
willwilliams:
This is fun and does just what I had in mind! Thanks!
willwilliams:
(just made a quick dontation too! You guys here are great)
Navigation
[0] Message Index
Go to full version