SitePoint Sponsor |
|
User Tag List
Results 1 to 6 of 6
Thread: creating hotkeys...
-
Aug 21, 2003, 14:18 #1
- Join Date
- Nov 2001
- Location
- Colorado
- Posts
- 2,085
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
creating hotkeys...
is there a way to create a hotkey in JavaScript?
ie) hit the 'v' key on the keyboard and it calls a function...
thanks.WordPress Plugins: Comment Info Tip
My Blogs: What a Savage | Search-This
Tools: Search Engine Decoder | PageRank Decoder
Podcast: Rand Fishkin | SitePoint Founders
-
Aug 21, 2003, 14:27 #2
Yes, but it more of a HTML 4.0 thing, you don't need Javascript in a standards compliant browser:
Code:<form action="accesskey.htm"> <p>A field using [Alt]+]+<SPAN style="text-decoration:underline;">f</SPAN>:<br> <input type="text" size="40" value="Field" accesskey="f"></p> <p>A button using [Alt]+<SPAN style="text-decoration:underline;">b</SPAN>:<br> <input type="button" value="Button" accesskey="b"></p> </form>
No Javascript, just HTML.
The SPAN is to give the users a visual representation, just like a standard windows GUI.
-
Aug 21, 2003, 15:10 #3
- Join Date
- Nov 2001
- Location
- Colorado
- Posts
- 2,085
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
so accesskey is a set aside word that does it?
WordPress Plugins: Comment Info Tip
My Blogs: What a Savage | Search-This
Tools: Search Engine Decoder | PageRank Decoder
Podcast: Rand Fishkin | SitePoint Founders
-
Aug 21, 2003, 15:14 #4
Yes, thats right. accesskey is an attribute of mostly anything with a visual representation, even <span>.
-
Aug 22, 2003, 04:40 #5
- Join Date
- Dec 2001
- Location
- Market Harborough, UK
- Posts
- 206
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Hey! I was about to ask a similar question so it has kind of saved me the trouble...
I'd like to user Enter and Esc as my access keys - obviously, they are not printable characters, so how would I define them?
Thanks,Paul Simpson, BSc, MCNI, MCNE
-
Aug 22, 2003, 09:31 #6
- Join Date
- Nov 2001
- Location
- Colorado
- Posts
- 2,085
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
yep, me too, I need to use like an 'Enter' key or a 'Tab' that will call a function. This is for a handheld device.
WordPress Plugins: Comment Info Tip
My Blogs: What a Savage | Search-This
Tools: Search Engine Decoder | PageRank Decoder
Podcast: Rand Fishkin | SitePoint Founders
Bookmarks