geekhack

geekhack Community => Keyboards => Topic started by: BigWopHH on Fri, 24 July 2009, 20:17:43

Title: Assigning Sounds To Certain Keys
Post by: BigWopHH on Fri, 24 July 2009, 20:17:43
Hey All,

I'm sure someone here will have an easy answer to this one.

I'm trying to help someone find a program that will play a sound anytime the Caps Lock key is pressed.  She's older and has trouble typing and is constantly hitting Caps Lock by mistake, which really slows her down.  She needs some sort of audible feedback whenever the key is pressed.

Any help you could provide would be awesome.
Title: Assigning Sounds To Certain Keys
Post by: wellington1869 on Fri, 24 July 2009, 21:23:43
autohotkey will do this in two seconds, and a lot more than just that too.
Title: Assigning Sounds To Certain Keys
Post by: wellington1869 on Fri, 24 July 2009, 21:29:54
Here:

go here and download and install autohotkey.exe:
http://www.autohotkey.com/

Then, put the code below into a file named "capslock_beep.ahk".  Put that file into the windows startup folder.

Thats it, done. Everytime you hit capslock you'll get the windows exclamation sound. You can choose from different sounds as indicated in the code below.

Code: [Select]
;
; AutoHotkey Version: 1.x
; Language:       English
; Platform:       Win9x/NT
; Author:         A.N.Other <myemail@nowhere.com>
;
; Script Function:
; Template script (you can customize this template by editing &quot;ShellNew\Template.ahk&quot; in your Windows folder)
;

#NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.

capslock::soundplay, *48

;other sounds:
;*-1: Simple beep. If the sound card is not available, the sound is generated using the speaker.
;*16: Hand (stop/error)
;*32: Question
;*48: Exclamation
;*64: Asterisk (info)

Title: Assigning Sounds To Certain Keys
Post by: fuzzybyte on Sat, 25 July 2009, 04:47:15
Might be a silly idea, but could you set Autohotkey to emulate the clickyness of blue cherries with brown cherry keyboard?

That way you could silence your keyboard when your co-workers are around and turn back those awesome clicks when they're gone.
Title: Assigning Sounds To Certain Keys
Post by: Rajagra on Sat, 25 July 2009, 05:04:44
Quote from: fuzzybyte;104265
Might be a silly idea, but could you set Autohotkey to emulate the clickyness of blue cherries with brown cherry keyboard?

That way you could silence your keyboard when your co-workers are around and turn back those awesome clicks when they're gone.

Noisykeyboard (http://geekhack.org/showwiki.php?title=Island:4664) will if AHK won't.
Title: Assigning Sounds To Certain Keys
Post by: ch_123 on Sat, 25 July 2009, 19:43:31
I can't help but think of some unneccessarily complicated hack involving those old linear Zenith (http://geekhack.org/showthread.php?t=5796) boards...