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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
thread Thread Starter Forum Replies Last Post
A simple but maybe a dumb question about Dashboard widgets. ozziegn Mac Applications and Mac App Store 5 Mar 9, 2008 10:52 PM
Basic questions about mighty mouse and Dashboard Widgets Mikebike125 Mac Basics and Help 7 Aug 23, 2007 12:16 PM
Dashboard/Widgets Question... Tim117 Mac Basics and Help 5 Jan 15, 2007 10:56 PM
notepad dashboard widget font color question orijinal OS X 7 Nov 26, 2005 06:05 AM
Regular Widget and Dashboard Widgets PowermacG5 OS X 4 May 15, 2005 08:36 PM


All times are GMT -5. The time now is 09:41 AM.

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

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