0

I'm looking for a solution to a web-form issue I'm facing at the moment. I'd like to be able to use the keyboard to save web-forms - essentially a button press - but I want to keep the desktop convention of Control+S to save the form.

How can I handle a button press that won't cause the browser to try to save the web-page locally?

Jon Mitten
  • 1,965
  • 4
  • 25
  • 53
  • 1
    possible duplicate of [How do I capture keystrokes on the web?](http://stackoverflow.com/questions/4532773/how-do-i-capture-keystrokes-on-the-web) – MattSizzle Apr 08 '14 at 21:02

1 Answers1

1

with jQuery you basically can suppress the default action of an event by firing an

event.preventDefault();

http://api.jquery.com/event.preventdefault/

But the main problem here is that browsers act different. The task has been discussed in another thread already:

Best cross-browser method to capture CTRL+S with JQuery?

Community
  • 1
  • 1
b4ttl3m4st3r
  • 106
  • 11