473,322 Members | 1,259 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,322 software developers and data experts.

On keypress event ... Can the bell be disabled?

You'd think this was an occasionally asked question, but a search for
previous related posts only turned up one from 1999, and that one was
never anwered. So...

When handling a keypress event, the terminal bell always rings (at
least with Internet Explorer). While it's not a show-stopper, it can
become annoying. Anyone have any tricks to silence the bell?

Thanks in advance!

-Dave H.

Sep 27 '05 #1
7 1967


Dave Hammond wrote:
When handling a keypress event, the terminal bell always rings (at
least with Internet Explorer). While it's not a show-stopper, it can
become annoying. Anyone have any tricks to silence the bell?


When you press a key with script disabled you get no bell but if you
have script with an onkeypress handler then you get a bell?
Never heard of that.
Have you tried to change some IE/Windows settings (no idea which ones
that would be)?
Do you have a URL where that effect could be visited?

--

Martin Honnen
http://JavaScript.FAQTs.com/
Sep 28 '05 #2
The application defines handlers for the Enter key and several Alt-x
key combinations. I know this is not kosher from a web development
purist's point of view, but the application is targetted at a corporate
data entry staff, and the key redefinition mimics a legacy application,
providing a vastly reduced learning curve.

Anyway, the Enter key normally doesn't beep, but after defining the
handler it now does. The Alt-x key combinations always beeped
(presumably because they have no native function).

Sep 28 '05 #3
Lee
Dave Hammond said:

... the application is targetted at a corporate
data entry staff, and the key redefinition mimics a legacy application,
providing a vastly reduced learning curve.


You're trading a learning curve for months of headaches.
It will never be quite the same as the legacy system.
Bite the bullet and allow them to learn to use a web interface.

Besides the problems you're having trying to pervert the browser
to look like something else, and the new problems that will arise
with each new browser version, it won't be long before your data
entry people begin to complain because the interface doesn't
behave they way they expect web applications to behave.

Sep 28 '05 #4
Dave Hammond wrote:
When handling a keypress event, the terminal bell always rings (at
least with Internet Explorer). While it's not a show-stopper, it can
become annoying. Anyone have any tricks to silence the bell?


Are the handlers navigating somewhere? If so, go to the Control Panel,
Sounds, and select [none] as the sound event for "Start Navigation".
That's all I can think of off-hand.

Luck!
Kev

Sep 28 '05 #5
Months of headaches? "Pervert" the browser? It sounds like you're
someone who has the luxury of telling his customers how he expects them
to work, and doesn't mind throwing their productivity out the window
for the sake of a design philosophy.

First, these are data entry operators: they get paid to enter as much
data as possible in as short a time span as possible. They're
experienced and extremely proficient at using the right hand to enter
numbers on the keypad and hit Enter to advance from field to field.
Their right hand never leaves the keypad, so their productivity is
maximized. Their left hand positions on the Alt key, ready to hit
whatever command key combination is required. If I changed their model
to a strict browser style, they'd be using the Tab key (or worse, the
mouse) to advance through the fields. They'd need both hands to enter
data, and the left hand would have to serve double duty for Tabbing
through the fields and entering commands. Their productivity would
drop like a stone. And, I'd probably be looking for a new job.

Second, I fail to see why using a documented part of the javascript API
is "perverting" anything. If the javascript API developers didn't
think being able to trap key press events was a good thing, then why
would they have spent the effort writing code to support it?

As for new problems arising with new browser versions: that's what
development cycles are for. If the API changes, then we modify our
applications accordingly. If a new browser version fails to adequately
support a well documented part of the API, then chances are very good
that it wouldn't make it on to our users desktops.

-Dave H.

Sep 29 '05 #6
Lee
Dave Hammond said:

Months of headaches? "Pervert" the browser? It sounds like you're
someone who has the luxury of telling his customers how he expects them
to work, and doesn't mind throwing their productivity out the window
for the sake of a design philosophy.
No, I'm somebody who's made the mistake that you're making.
Once. And have had enough sense since then to convince
anybody who wanted me to do it again that they were making
a mistake.

You will regret it. Do not try to make a browser behave
like something else.

First, these are data entry operators: they get paid to enter as much
data as possible in as short a time span as possible. They're
experienced and extremely proficient at using the right hand to enter
numbers on the keypad and hit Enter to advance from field to field.
Their right hand never leaves the keypad, so their productivity is
maximized. Their left hand positions on the Alt key, ready to hit
whatever command key combination is required. If I changed their model
to a strict browser style, they'd be using the Tab key (or worse, the
mouse) to advance through the fields. They'd need both hands to enter
data, and the left hand would have to serve double duty for Tabbing
through the fields and entering commands. Their productivity would
drop like a stone. And, I'd probably be looking for a new job.
If that's true (and I believe you're underestimating their
ability to adapt), then it is foolish to try to get them to
use a browser for this application. Do not try to make a
browser behave like something else.
Second, I fail to see why using a documented part of the javascript API
is "perverting" anything.
The fact that you are able to do something does not make it
reasonable to do it. There are many legitimate reasons for
capturing keypresses. Trying to make a browser behave like
something else is not one of them.
As for new problems arising with new browser versions: that's what
development cycles are for. If the API changes, then we modify our
applications accordingly. If a new browser version fails to adequately
support a well documented part of the API, then chances are very good
that it wouldn't make it on to our users desktops.


That's a good one. What do you do when a browser that doesn't
behave the way you expect it to behave is required by your users
for some other job function, and so your management tells you to
make it work? Probably wish you hadn't agreed to this mistake
in the first place.

Sep 29 '05 #7
Maybe I'm being dense, but what reason would you have to capture a
keypress, if not to "do something" when the key is pressed? Clearly,
the "something" could have been triggered by a mouse click, since that
is the native user interface for a browser. However, presumably, the
application developer felt that it made more sense to invoke the
functionality by key-press rather than mouse click. Whether to mimic a
legacy application or extend the user interface for some other reason,
what is the difference? You're still using the key press event
handler, and it still rings the bell when captured (which was my
original issue).

With regard to browser versions, our company standards specify a set of
well-known browsers, whos APIs are well documented. Other than as a
purely theoretical notion, I don't believe that you could point to a
real-world situation where (for a desktop environment) a well known and
supported browser was tossed aside in favor of a different browser than
had X capability, but happened to not support some pre-existing,
well-documented capability.

Finally, as to a browser not being the correct interface model for this
application, I might actually agree there, to some extent. However,
the application in question is a small part of a very large system
which was designed specifically to operate via a web interface. For
this company's business model, the ubiquity of the browser so far
outweighs the minor interface deficiencies, that there would never be a
serious discussion about tossing it aside for a dedicated-purpose
application that had to be installed, maintained, and upgraded on the
client desktop (which is not always under our control) rather than the
server (which is).

Anyway, it seems like we have philosophical differences and it probably
makes sense to just leave it at that. Besides that, I'm guessing that
you have no technological information which relates directly to my
original post? ;-)

Sep 29 '05 #8

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

Similar topics

1
by: Thomas | last post by:
Hey y'all, I'm using firebird 0.7 and developed some kind of inline editing with java script. Therefore I used the keypress event listener. The problem is that I can only enter one character...
3
by: Darryn Ross | last post by:
Hi, I am trying to catch the KeyPress event on my datagrid but it isn't working... i have also tried registering the handler with the event like this... dgGLBatch.KeyPress += new...
1
by: Rene | last post by:
Hi, I am running is some problems with the KeyPreview and KeyPress events. The KeyPress event is only triggered when there this an focusable control on the form. When all controls are disabled...
4
by: Tom | last post by:
I have a VB.NET user control that I wrote - this control has three or four other controls on it (textbox, combobox, datetime picker, etc). Now, whenever the control is on a form and the user enters...
15
by: Adam J. Schaff | last post by:
I have noticed that if a user closes a form via pressing return (either while the OK button has focus or if AcceptButton is set to OK for the form) then the "ENTER" keypress event fires ON THE...
3
by: Fia | last post by:
Hi In Visual Basic 6 I could call keypress with an integer of a choosen key. For example I could call a textbox's keypress with the number 13 (for the enter key). But now in Visual Basic .Net I...
5
by: awebguynow | last post by:
to submit or not to submit - that is the question and I'm going to be designing some lengthy forms, where many of the fields may be populated with data, and the user may only want to view it. ...
2
by: Tony Johansson | last post by:
Hello! I have created a Control that consist of a label and a textbox.I have called this class ctlLabelTextbox. public partial class ctlLabelTextbox : UserControl { .... } The class that I...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.