Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Create functional volume keys for keyboards System
I couldn't find this covered, and it's fairly simple, but I didn't see any references to it elsewhere, either. I recently bought a Kensington keyboard to replace my broken Apple keyboard -- I figured it was worth saving a few dollars. Then I realized that it would be awfully hard to live without my volume adjustment keys! Enter AppleScript and Xkeys.

I simply mapped AppleScripts that adjust the volume (up, down, and mute; courtesy of a Google search) to function keys F13 - F15. Voila! Works exactly like my other keyboard!

[robg adds: Though the author offered to share his scripts, I figured I'd just list three that worked; these may differ from those of the author, but I tested them and they work...

Volume Up:
set volume output volume ((output volume of (get volume settings)) + 3)
Volume Down:
set volume output volume ((output volume of (get volume settings)) - 3)
In both of the above, feel free to change the 3 to another value; go outside +3 or -3, and the volume change per key press increases; go the other way to reduce the step size.

Toggle Mute:
if output muted of (get volume settings) then
  set volume without output muted
else
  set volume with output muted
end if
Though they were tested, I didn't actually use Xkeys to assign them, but I wouldn't expect any issues...]
    •    
  • Currently 3.00 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (2 votes cast)
 
[6,999 views]  

Create functional volume keys for keyboards | 4 comments | Create New Account
Click here to return to the 'Create functional volume keys for keyboards' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
screen brightness?
Authored by: jspivack on Nov 10, '05 08:23:09AM

any ideas for screen brightness? esp. tricky since the built-in keys on my PB only manage the internal screen, and I also have an external screen attached...(this is for use with my external USB keyboard)



[ Reply to This | # ]
Create functional volume keys for keyboards
Authored by: xavierbdm on Nov 10, '05 04:32:54PM

As a side-note, you do not need Key Xing (which nonetheless is a very straightforward and sleek application, but shareware) to enable key triggers: QuickSilver, the magical power-tool app, does let you assign triggers (keys) to actions.
http://blacktree.quicksilver.com

---
iMac G4 17 800/512/80 + powerbook firewire G3 500/512/30



[ Reply to This | # ]
Create functional volume keys for keyboards
Authored by: xavierbdm on Nov 10, '05 04:35:35PM

Sooorry! did not see the mentionned app for key programming was xkey, not Key Xing.
So ok, for those who need just key assigned to actions, xkey is cool.
For those who already use QuickSilver, no need to add another utility.

---
iMac G4 17 800/512/80 + powerbook firewire G3 500/512/30



[ Reply to This | # ]
Create functional volume keys for keyboards
Authored by: vonleigh on Nov 14, '05 10:39:20AM

Apple Keyboard is $29, how much are you saving?



[ Reply to This | # ]