Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

atari1356

macrumors 68000
Original poster
Feb 27, 2004
1,582
32
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 :)
 

robbieduncan

Moderator emeritus
Jul 24, 2002
25,611
893
Harrogate
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.
 

atari1356

macrumors 68000
Original poster
Feb 27, 2004
1,582
32
robbieduncan said:
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. :)
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.