Home | Blog | Software | Reviews and Features | Forum | Help | Donate | About us
topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • December 10, 2016, 10:31:13 AM
  • Proudly celebrating 10 years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: IDEA holding down key to give Capital Letter  (Read 2924 times)

willwilliams

  • Supporting Member
  • Joined in 2007
  • **
  • default avatar
  • Posts: 12
    • View Profile
    • Donate to Member
IDEA holding down key to give Capital Letter
« on: October 17, 2007, 10:50:46 AM »
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 
« Last Edit: October 17, 2007, 01:32:49 PM by willwilliams »

togikun

  • Participant
  • Joined in 2006
  • *
  • default avatar
  • Posts: 6
    • View Profile
    • Donate to Member
Re: IDEA holding down key to give Capital Letter
« Reply #1 on: November 05, 2007, 03:42:50 PM »
This is not a very elegant solution, but it does the job.

;
; Author:  Togi <dj.togi+code@gmail.com>
;

#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

  • Supporting Member
  • Joined in 2007
  • **
  • default avatar
  • Posts: 12
    • View Profile
    • Donate to Member
Re: IDEA holding down key to give Capital Letter
« Reply #2 on: November 11, 2007, 12:53:54 PM »
This is fun and does just what I had in mind!  Thanks!

willwilliams

  • Supporting Member
  • Joined in 2007
  • **
  • default avatar
  • Posts: 12
    • View Profile
    • Donate to Member
Re: IDEA holding down key to give Capital Letter
« Reply #3 on: November 11, 2007, 01:01:44 PM »
(just made a quick dontation too!  You guys here are great)