Register FAQ / Rules Forum Spy Search Today's Posts Mark Forums Read
Go Back   MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Reply
 
Thread Tools Search this Thread Display Modes
Old Nov 22, 2004, 06:41 PM   #1
atari1356
macrumors 68000
 
Join Date: Feb 2004
Dashboard Widget Question

A simple question for anybody who has Tiger:

With the Calculator widget Apple currently has in Tiger, can you use the number keypad on your keyboard to enter information? Or do you have to use the mouse and click on each number? Since the widgets are built using html/css/javascript I'm not sure if that's possible.

I'm curious because I'm trying to develop my own calculator app, and am debating on whether to make it a Widget - or full blown Cocoa app.

Thanks
atari1356 is offline   0 Reply With Quote
Old Nov 23, 2004, 08:47 AM   #2
robbieduncan
Moderator
 
robbieduncan's Avatar
 
Join Date: Jul 2002
Location: London
Not at home to try it out for you, but it is perfectly possible to capture keyboard events in JavaScript. Take a look at Chapter 19 of "JavaScript The Definitive Guide" if you have a copy.

Take a look at the onkeypress (or onkeydown) handlers for the body tag.
robbieduncan is offline   0 Reply With Quote
Old Nov 23, 2004, 08:57 AM   #3
ang8385
macrumors member
 
Join Date: Mar 2004
yes it can, but first you'll have to click once on the calculator
ang8385 is offline   0 Reply With Quote
Old Nov 23, 2004, 03:44 PM   #4
atari1356
Thread Starter
macrumors 68000
 
Join Date: Feb 2004
Quote:
Originally Posted by robbieduncan
Not at home to try it out for you, but it is perfectly possible to capture keyboard events in JavaScript. Take a look at Chapter 19 of "JavaScript The Definitive Guide" if you have a copy.

Take a look at the onkeypress (or onkeydown) handlers for the body tag.
Thanks, I don't have that book but I'll see if I can find out how to do that elsewhere.
atari1356 is offline   0 Reply With Quote
Old Nov 23, 2004, 04:57 PM   #5
robbieduncan
Moderator
 
robbieduncan's Avatar
 
Join Date: Jul 2002
Location: London
Quote:
Originally Posted by atari1356
Thanks, I don't have that book but I'll see if I can find out how to do that elsewhere.
Fair enough! It was sitting on my desk at work, so handy. Give this a shot...
robbieduncan is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Similar Threads
thread Thread Starter Forum Replies Last Post
Weather Widget in Dashboard not working Drew017 OS X 10.8 Mountain Lion 11 Jan 14, 2013 07:37 PM
Any good dashboard photo widget? ( OS X ML ) hsyiu OS X 1 Dec 7, 2012 11:50 PM
Dashboard widget position pexel OS X 10.8 Mountain Lion 4 Aug 5, 2012 10:24 PM
Dashboard Widget - Internal information chrvdMark Mac Applications and Mac App Store 4 Jul 3, 2012 04:48 PM
Dashboard Widget Suggestions? Winter Charm Mac OS X 10.7 Lion 4 Jun 10, 2012 10:58 PM

Forum Jump

All times are GMT -5. The time now is 06:44 AM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC