keypress

How do you use jquery .live() with keystrokes?

I am building a photography portfolio for a client and decided to make it a little bit more interactive. I got rid of all buttons on the site and had the user interact with the site using key strokes. My original code used: $(document).bind('keydown', function( e ) { but this unfortunately would not allow the user to interact with the...

[SOLVED]How to propagate keyPressEvent on different qt QMainWindow

I have 2 different QMainWindow, the first is the parent of the second. I want press some keys in the children windows and propagate the event in the parent. I create for everyone the function void keyPressEvent(QKeyEvent* event); but when i press key on the children the event is not propagate to the parent. Why? This is the code... //P...

Can I conditionally change the character entered into an input on keypress ?

Is it possible to change the character which has been entered on keypress, without doing it manually? For example, if I want to force uppercase letters based on some condition, it'd be nice to do the following: function onKeypressHandler(e) { if ( condition ) { e.which -= 32; } } But of course that doesn't work. ...

keypressed() and onCLick() implementation problem in IE

I've the following input text box and a button. <div id="sender" onKeyUp="keypressed(event);"> Your message: <input type="text" name="msg" size="70" id="msg" /> <button onClick="doWork();">Send</button> </div> The keypressed(event) function actually detects if the key being pressed is "Enter" and calls the doWork() function....

What event is used for autocomplete in jQuery

What is the correct event to use with autocomplete-type functionality? I'm doing something similar to autocomplete and tried using the "keypress" event, however, when I go to get the text out of the input that fired the even, it only has the text before the event was fired. Should I be using a different event, or perhaps just append th...

How to force an NSTextField to accept the text?

I have an NSTextField in a Preferences panel. It provides a field to enter a url in. However, if the user closes the Preferences panel after editing the text in the field, the new value does not get propagated to the User Defaults. This only happens after the user explicitly does Enter or Tab. This kind of makes the whole approach useles...