I have a form, and want to disable/enable its submit button depending on whether the form's input text fields are empty or have had text entered into them.
I think this means having an event handler for the input text fields' keydown or keypress events: when it's fired, this event handler should test whether the input text fields contai...
I have a custom CMS and would like to add a "shortcuts menu" triggered by the pressing of the Ctrl key twice within, say, 300 milliseconds.
I use prototype, so my starting point obviously is:
Event.observe(document, 'keypress', function(event)
{ if(event.keyCode == Event.KEY_XYZ) { show_shortcuts});
My approach at the moment would ...
I want to insert TAB characters inside a TEXTAREA, like this:
<textarea>{KEYPRESS-INSERTS-TAB-HERE}Hello World</textarea>
I can insert before/after the existing TEXTAREA text - and I can insert / replace all text in the TEXTAREA - but have not yet been able to insert inside the existing TEXTAREA text (by the cursor) in a simple way.
...
Ok, so I'm in the process of making a Tic-Tac-Toe game to help me learn C#.
I'm attempting to add a bit of functionality to it, so I want people to be able to use the NumPad on a computer to simulate clicking the buttons.
Here is what I have but when I use the NumPad the buttons don't click.
Can any of you see a reason as to why?
...
so that it would be cross browser
...
I'd like to either simply swallow an Enter key press in <input> fields or else instead substitute Tab key presses. I haven't yet decided which is best.
How can I do this in jQuery? I've got this so far:
$(document).ready(function(){
...
//handle enter key
$("input").keypress(function (e) {
var k = e.keyCode || e.w...
I've created a python script in which an event needs to be executed each time I press the Super (or WinKey) on my keyboard.
How can one achieve this without the python process being "focused" - as it is running in the background waiting for the key to be pressed to execute the event?
I've seen a lot of posts around the web showing me h...
I'm using jCarouselLite to create a navigation element somewhat similar to the tabbed navigation used on Panic's Coda site, but I'd like to trigger the left and right scroll on a keypress. Can this be done without modifying the jCarouselLite code? Thanks!
...
I want to write a programme (in python) on Linux (Ubuntu Linux 9.10) that will keep track of how many key presses per second/minute I make. This includes normal letter keys, and control/shift/space/etc.
Is there some way to hook into X so that I can say "when a key is pressed call this function?". Since I want to have this running in th...
I was looking at how to capture global kepresses on Ubuntu Linux regardless of what window has focus. And people suggested some programmes to look at. But they all use the RECORD thing in XLib, which is broken in Ubuntu. Is there some other way to capture all the keypresses on Ubuntu? How about using HAL? DBus?
...
I need a function that, given a character, returns the CGKeyCode associated with the position of that character on the current keyboard layout. E.g., given "b", it should return kVK_ANSI_B if using U.S. QWERTY, or 45 if using Dvorak. The Win32 API has the function VkKeyScan() for this purpose; X11 has the function XStringToKeySym(). Is t...
Here's what will happen, a message is displayed with a specified time waiting for keypress, if no keypress then it will resume.
Example
"Press ESC to exit, otherwise you will die.. 3..2..1"
"Press 'x' to procrastinate and check email, read some blogs, facebook, twitter.. otherwise you will resume work for 12 hours.. 3..2..1"
This sho...
Hi everyone!
I wrote this code for my unit tests in c# with selenium to test my web application. In particular I'm testing that the window for the tooltip is properly displayed and after esc key press it disappears:
private const string XPathToolTipStyle = "//form[@action='search.aspx'] //div[@id='searchToolTip']/@style";
private bool...
I would like to get whether (for example) the 3 key is pressed (KEY_NUM3).
I have tried getKeyStates but it only detects the game action keys.
How could I get the states of non-game action keys?
(I have overridden the keyPressed and keyReleased functions of Canvas and storing the key states in an array (I'm using a Vector for storing but...
Hello,
I am currently adding an input via a .click event and then wanting to listen to any keypress that occurs on this input. However, the appended isn't firing any events after it is inserted (i.e. blur, keypress, focus). Does anyone have any suggestions? Thanks in advance!
$("#recipientsDiv").click(function(){
$(this).append...
I'm trying to accomplish something similar to the fellow here, but going with the answer there leaves me with a bit of a bug that's not a huge deal, but ugly from a user POV:
When it puts the keypress data into the textbox, if the user presses the modifier keys before the character (like one does), the textbox is being populated includ...
How do I write a code that loops while the LEFT or RIGHT arrow key is pressed?
...
Hi! I wanted to know, what would the coding be if I wanted to toggle mute/unmute of my microphone. I am making a program that can run in the background and pickup a keypress event and toggle mute/unmute of the mic. Any help with any of that coding would be very helpful. I am pretty new to C#, and this is just a really simple program I wa...
I'm trying to simulate keypress to my games that use direct input(I guess).
I googled around and I found out the method SendIput().
It work fine if I try to send keypress to notepad.exe but nothing happend when I tried to games.
I checked this site
http://www.elitepvpers.de/forum/war-hacks-bots-cheats-exploits/170258-simulating-keystrok...
Hey,
I'm trying to make some sort of intellisense look a like for an editor I'm working on.
When the user types in the richtextbox and the letters match a word a listview will pop-up and the matched word will be selected.
the problem is the focus is still on the richtextbox so all the key presses will go to that control, which is good...