473,394 Members | 1,800 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

How to capture function key presses

guys,

i want to capture all the function key presses from F1 to F12. now i
want that when the user presses F1 from within the browser i should
display a alert window saying that they have pressed F1 instead of
displaying the browser help.

how can i implement this. thanks.

Oct 31 '06 #1
2 5673
pe******@gmail.com ha scritto:
i want to capture all the function key presses from F1 to F12. now i
want that when the user presses F1 from within the browser i should
display a alert window saying that they have pressed F1 instead of
displaying the browser help.
You can do this in IE only with a .hta file (groups.google.com). For F1
key you can use:

window.onhelp=function()
{
alert("help");
return false;
}

Regards.

--
Luke S.

--

questo articolo e` stato inviato via web dal servizio gratuito
http://www.newsland.it/news segnala gli abusi ad ab***@newsland.it
Nov 1 '06 #2
ASM
pe******@gmail.com a écrit :
i want to capture all the function key presses from F1 to F12. now i
want that when the user presses F1 from within the browser i should
display a alert window saying that they have pressed F1 instead of
displaying the browser help.
In which browser ?
On Windows, Mac, Linux ... ?

i.e : my Opera thinks I press F4 when Ctrl+4 are pressed :-(
i.e : on my Mac F9 to F16 are reserved for system
doubt you can catch them ?
i.e : on my Browser F1 is not for the Help
(not important it does nothing)
how can i implement this. thanks.
Implement what and why ? and for who ?

In my FF on my Mac =
F1 -keyCode = 112
F2 -keyCode = 113
....
F12 _keyCode = 123

http://perso.wanadoo.fr/stephane.mor...c/key_code.htm

--
ASM
Nov 1 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Me Mine | last post by:
i, I have trying to code a small console app that will allow a user to select a window and then create a screen capture of the window. I haven't been able to figure out how to do the screen...
2
by: aimee | last post by:
Hi. Is there a way to capture the events fired in a PrintDialog? I would like to capture when the user presses "Print" so I can do some cleanup. The asp.net (IE6) application I'm working on has 6...
2
by: orekinbck | last post by:
Hi There In a C# windows app in .NET 2003, I would like to capture when the user is within a certain text box and holds down shift then presses tab. Atm, my code is: protected override bool...
2
by: Don | last post by:
It took me a while to find this code, so I decided to post it here for others who might also be looking for a way to trap tab key presses. You can extend a control and place this code in it to...
0
by: j101 | last post by:
I am attempting to set up Q Capture on RH Linux (x86_64) using DB2 9 fp2, but there seems to be a general problem loading a specify MQ shared library "/opt/mqm/lib/libmqm_r.so". I have MQ v6...
6
by: trbjr | last post by:
Hello experts, I want to describe a project design and then ask some questions at the end. There is no code in this discussion, just symbols to illustrate an idea. Let S stand for a screen...
1
xarzu
by: xarzu | last post by:
How do I capture the event in a CEdit control when the user presses enter or return in a dialog box? I have so far figured out how to disable the event when the user hits return which normally would...
5
by: sourav08 | last post by:
Hello, I'm developing a website using PHP, Javascript and MySQL. I have a login form with a couple of textboxes and a login button. What I want to do is capture the Enter key so that when the...
4
by: Vighneswar | last post by:
Hi All Can anybody please suggest me in this regard that I need to capture the keystrokes on all the word processors (Ms Word, Excel .. Etc), text editors (Notepad .. Etc) and suggest nearer...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.