Home » Microsoft Technologies

How to disable backspace

Is there a way to disable backspace, so that when I am entering text in a form and hit the backspace, I don't accidentally go back a page if my cursor is outside of the text box?

This is a major problem for online university tests that have essays, because you end up ending your test in the middle of an essay if you hit the backspace.

Note - I don't want to disable this as a web-developer, but rather as a client. (IE, there's a lot out there on code to disable backspace on a web-page you wrote; I want to know how to disable it for all webpages of my copy of IE 6).

11 Answers Found


Answer 1

Hello Jon, As far as im aware to do what you are talking about would require the coding of the keyboard configuration to be changed, for example when in explorer (My computer ect.. not Internet Explorer) and you click on the backspace key it will take you to the previous page you where on, so if your in c:\ drive it will take you back to My Computer ect. now im not sure how exactly this can be done as im no coding genius, however there is one way to get around this. Depending on the keyboard you have, the multimedia ones come with software that allows you to change the key configurations, so the backspace key can be changed to not goto the previous screen, however this will change the way it operates in Windows to, so you will not be able to use it to go back in any Explorer windows as well as in Internet Explorer. The keyboard i have is Microsoft intelliTypePro wireless which comes with the software that allows you to modify the key settings. I dont know if this can be done on a normal keyboard or if you would need to be a multimedia keyboard, try searching for any software that changes the key functions. This is just a workaround to resolving the problem you have and isnt meant to fix the issue per say, try giving it ago and seeing if this resolves the issue, another idea would be to set another key the function of "goto previous page" so you dont loose that function. If you want anymore information just let me know on ozolayer@hotmail.com Omar Abul-Ragheb    Edit: I managed to find some software that does it for you no matter what keyboard you have, goto http://www.softboy.net/ the fourth and fifth software listed downwards are free trials so you can test them to see if they produce the desired results... Better yet these two sites offer FREE software to change the keyboard functions for you, http://www.randyrants.com/sharpkeys/ and http://www.randyrants.com/sharpkeys/ which are mentioned on http://en.wikipedia.org/wiki/Computer_keyboard which also holds some more information regarding keyboard information and layouts. I havent tried any of the software so leave some feedback for others if one of them resolve the issue, and remember these programs will remap the key functions so they will change in windows too and not just IE6, so be carefull when modifying the keys! Hope this helps!

Answer 2

Thanks for the suggestion, Omar.
 This almost works, but I want to be able to use the backspace key for its original function (backspace), instead of just disabling it, or assigning it to another key. It turns out that if you hold down shift and press backspace, it still does it's original function, but doesn't go back a page. However, with key-remappers, you can only remap to 1 key, and not a key combination.


Answer 3

Hi Jon,

Sorry for the late reply, msdn doesnt have an e-mail alert for replies, if this is still a problem at the university, i have come across a possible solution, however it would mean requesting the users take the exams in firefox (i'm assuming as it's a university they have both browsers?).

The solution i'm refering to can be found at http://www.mydigitallife.info/2008/06/22/disable-or-enable-backspace-as-go-back-page-browsing-function-in-firefox/

Hope it helps.

Answer 4

Use Notepad.  Cut and paste your answer.

Answer 5

Yet ANOTHER example of Microsoft's 'brilliant' coders.  Anyone with ANY brains would allow this incredibly annoying, time-wasting and USELESS keyboard shortcut to be disabled, but not Microsoft. 

I'm starting to use Firefox more and more every day.


Answer 6

I couldn't agree more, I absolutely HATE that I'm constantly losing emails and entries on pages because of the backspace key!!!!  Unfortunately, it happens in Firefox too so I haven't found a solution yet!  If anyone else does, please let me know!



Answer 7

Its the KK's.

Test on this site....

1. Create a travel log for the current tab by navigating to a number of different sites in the same tab.

2. Return to this forum and click anywhere in the Client area to give focus to the body tag.

3. Press the Backspace key.... history will go back 1.

4. Go forward to return to this forum and then click on either of the Search text boxes (<input> tags) at the top of this page to give the input tags focus.

5. Press the Backspace key... history does not go back....the backspace key behaves as expected when a control tag has focus.

How to avoid the issue on your web sites -

Ensure that each <input> tag has a sequential tabindex. The browser should place focus on the first <input> element in the tabindex sequence.


Create an initializing function that forces focus to the <input> tag of your choice.

Those of you who validate your markup for section 508 compliance will already be aware of this requirement for keyboard navigation in web pages.


Answer 8


This is a browser issue, not a web site development issue.

I've lost several large forum posts in the MS forums and others by hitting the Backspace key while the writable HTML area on the web page clearly had the input focus - I could see the text cursor blinking.  So even this forum is not immune to the problem.  It doesn't matter at all whether tabindex is assigned in the HTML, or whether JavaScript is used to assign a default input field when the page is loaded.

Yes, it's true that this forum had eventually implemented a safety net by including a prompt that prevents navigation if you've begun editing, which is certainly very helpful at combating this problem.

But ultimately, the problem is that the cost of this feature, and the cost of every website having to write extra code to protect user data against this feature, does not outweigh its benefit.

If the IE team is concerned that removing this capability to protect user data will cause those that depend upon it to consider using another browser, then simply add an option: "Backspace navigates back in history when an input field is not currently focused (and sometimes when it is focused)".  It should be disabled by default, though, because web pages don't currently function like rich client applications, thus they all cannot be expected to protect user data from inadvertent navigation related to common focus issues.  (Common, especially in this current AJAX pop-up age we live in.)

If the IE team is keeping this legacy feature around as an accessibility tool for the physically disabled, then please consider including the aforementioned option anyway and simply enable it by default when any of the accessibility options in IE or in Windows are detected as enabled during the installation of IE.



Answer 9

no tabindex attribute here. no onfocus="this.select();"

they are currently using jQuery 1.4.4 (the latest) , previously 1.2 something.


Answer 10

Okay, this IS a big deal to people who write a lot on the web.
I am Chief Editor at www.remarriagetoday.com and I can tell you it hurts the productivity of my staff.

However, here are your solutions:

Firefox – backspace only means backspace.
Opera - backspace only means backspace.
Chrome – add this extension: BackspaceMeansBackspace « Google Chrome Extensions
In IE – you are stuck with this ‘feature’.

My solution was to move to Chrome and then ADD the extension I referenced above. Problem solved, and productivity restored.

Stephen Paul
Chief Editor - www.RemarriageToday.com


Answer 11




...mmm the field has not received focus or the event handler is bubbled.



<< Previous      Next >>

Microsoft   |   Windows   |   Visual Studio   |   Sharepoint   |   Azure