DonationCoder.com forum
 
Read-only archive. This is a static copy of the DonationCoder.com forum. Reading and searching work as before; logging in, posting and private messages do not.
Archive of 2026-10-21 · About this archive · Main site

Author Topic: DONE: If Caps Shift ALREADY ON, pressing Shift key unsets Caps-Shift  (Read 35,345 times)

TWmailrec

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 130
    • Coding Snacks
8)
I am constantly finding CAP-SHIFT enabled and text entered has to be re-typed.
(Probably due to key re-map on grey Enter). What is needed is a program to do the following:
If Caps Shift is ALREADY ON, pressing Shift key unsets Caps-shift and capitalizes only while SHIFT is pressed.

tHIS WOULD AVOID HAVING WRONGLY CAPITALISED TEXT AS NEW LINES/SENTENCES
START WITH A capital LETTER.

cAN ANYONE HELP? Perhaps a program already exists, or an ahk can be created?

« Last Edit: March 07, 2006, 07:25 AM by brotherS »

skrommel

  • Fastest code in the west
  • Developer
  • Joined in 2005
  • ***
  • Posts: 933
    • Participated in NANY Challenge Twice
    • Coding Snacks
:) Almost too short, this one!

Or you could try CAPshift from my 1 Hour Software page.

Skrommel


Code
;CapShiftOff.ahk
; Pressing Shift turns off CapsLock
; To run, download and install AutoHotkey from www.autohotkey.com
;Skrommel @2006


#SingleInstance,Force
#Persistent
Return

~*Shift::
SetCapsLockState,Off
Return

TWmailrec

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 130
    • Coding Snacks
I didnt realise  it was that easy!

Many thanks for the code - Ill try it out

Deozaan

  • Charter Member
  • Joined in 2006
  • ***
  • Posts: 9,827
    • Participated in NANY Challenge Eight Times
    • Cody Award
Windows XP has functionality to beep at you when you press any of the "lock" buttons (Caps, Num, and Scroll). It scares the willies out of my mother (she always has her speakers turned up loud) but it's quite useful for catching that accidently "Lock" press.

If you've got the shortcut enabled, all you have to do is hold down the Num Lock key for five seconds and it will start beeping when you press the "Lock" keys. Otherwise just go into your Accessibitlity Options and enable ToggleKeys from the Keyboard tab.

TWmailrec

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 130
    • Coding Snacks
Re: IDEA: If Caps Shift ALREADY ON, pressing Shift key unsets Caps-Shift BY Skrommel
:(:(
One unfortunate byproduct of this program is that if Caps Shift is on
intentionally, and raised keys accessed (eg !"£$%^&*()}{~@:),
Caps Shift is reset by the program.
This would also apply to Shift+:{F1}-{F12},
Ctrl-Shift+: keys, Alt-shift keys, [used in WORD macros]
Shift+::{Delete}{Insert}{Up}{Down}{Left}{Right}{Home}{End} etc
Shift+::{Ctrl}{Alt}{LWin}{RWin}{AppsKey} &
Shift+:{Numpad0}-{Numpad9}
Shift+:{NumpadDot}{NumpadPgDn}

Is there any way to restrict macro to letters A to Z, & a to z ??

TWmailrec :'( :'(

skrommel

  • Fastest code in the west
  • Developer
  • Joined in 2005
  • ***
  • Posts: 933
    • Participated in NANY Challenge Twice
    • Coding Snacks
:) This should do the trick!

ShiftOff - Turns off CapsLock when Shift is pressed together with A-Z, and a few other keys.

You'll find the downloads and more info at 1 Hour Software by Skrommel.

Skrommel
« Last Edit: March 17, 2006, 04:02 AM by skrommel »

TWmailrec

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 130
    • Coding Snacks
Re: DONE: If Caps Shift ALREADY ON, pressing Shift key unsets Caps-Shift

Latest code from Skrommel works great - but original exe prog needed
adjustment as caused error:

    Error at line 26             (& Line 27)
    Linetext  +/E  Up
    Error Invalid Hotkey
    The program will exit

So I REMd lines 26,27 & 28 (which caused same error), and program now works well!
What functions of program are affected??

TWmailrec
« Last Edit: March 18, 2006, 04:02 AM by TWmailrec »

skrommel

  • Fastest code in the west
  • Developer
  • Joined in 2005
  • ***
  • Posts: 933
    • Participated in NANY Challenge Twice
    • Coding Snacks
:tellme: Nothing, they are just additional hotkeys, the norwegian Æ,Ø and Å. I think I'll add an option to include more keys, instead of having to edit the source code.

But I can't understand why you get an error? Anyone else get this behaviour?

Skrommel

skrommel

  • Fastest code in the west
  • Developer
  • Joined in 2005
  • ***
  • Posts: 933
    • Participated in NANY Challenge Twice
    • Coding Snacks
:) Try ShiftOff v1.1.

I added a settings dialog for changing the keys.

Skrommel

TWmailrec

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 130
    • Coding Snacks
To Skrommel

Great idea.
1st attempt revealed error key Æ, so I removed ÆØÅ from ini file
and program works well. I dont know why these keys are rejected

TWmailrec

wasker

  • Charter Honorary Member
  • Joined in 2005
  • ***
  • Posts: 52
Shameless plug: I Hate This Key Deluxe Edition. :D
It deals with all bad keys around here: Caps, Num, F-Lock, Power, Sleep, Insert, Apps and ahhh... Win key. ;D

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,931
    • Gathering Badge
    • Plugin Coding Medal
    • Participated in NANY Challenge Seventeen Times
    • Cody Award
    • Coding Snacks
    • Volunteers/Staff
i hate this key looks quite good wasker, nice work!

Original address: https://www.donationcoder.com/forum/index.php?topic=2674.0