keystroke

Cocoa: Accepting and responding to keystrokes

Hey everyone, I'm a newbie and I have what I anticipate will be a pretty easy question to answer. In order to learn a bit about event handling and drawing, I'm attempting to write a program that draws a black rectangle that increases in length every time the user hits the 'c' key. So far it just draws a black rectangle on a blue backgr...

jQuery resume setInterval timer on keystroke

I have a jQuery setInterval function named "timerIncrement" that times out (stops incrementing the variable [licount]) after x-seconds. to resume this interval I have a .mousemove function which looks like this: $(this).mousemove(function(){ licount = 0; timerIncrement(); }); what I'm looking for is a way to do this exact thing (res...

jQuery detect keystrokes and set variables accordingly

I have created a rudimentary EasterEgg within my code to activate when the following keystrokes are made (not simultaneously) Enter + c + o + l + o + r + s with the following code: isEnter = 0; isC = 0; isO = 0; isL = 0; isR = 0; isS = 0; $(window).keydown(function(e){ if(e.which==13) isEnter = 1; if(e.which==67) isC = 1; if(e.which...

Keystroke for cmd-? on OS X? (Java)

Hey there I'm desperately searching for the keystroke to access a help menu from my Java application. The command for that is cmd-?, but I've got no idea how to access that. The keystroke for cmd-c is defined by KeyEvent.VK_C, but unfortunately VK_? does not work. ;) I've searched the web up and down and couldn't find the right code. H...

Monitor keystrokes

Hi all , I am a beginner in C# , and making a calculator . But i want to disable the "GO!" button when there's no number typed in textbox1 and once the user enters a number in it the "GO!" button becomes enabled again ... how to do this in C# ? i tried KeyDown and KeyPress event like this but never worked private void Form1_Load(object...

Java Swing KeyStrokes: how to make CTRL-modifier work

In the following program, why does hitting the 'a' key print "hello, world" while hitting 'CTRL-a' doesn't? import java.awt.event.*; import javax.swing.*; public class KeyStrokeTest { public static void main(String[] args) { JPanel panel = new JPanel(); /* add a new action named "foo" to the panel's action map */ ...

How to intercept capture TAB key in WinForms application?

Hi, could you please help me with this one? I'm trying to capture Tab key in Windows Forms application and do a custom action on it. I have a Form with several listViews and buttons, I've set Form's KeyPreview property to true and when I press any other key than tab, my KeyDown event handler does get called. But that's not true with the...

How to properly implement cheat codes?

Hi, what would be the best way to implement kind of cheat codes in general? I have WinForms application in mind, where a cheat code would unlock an easter egg, but the implementation details are not relevant. The best approach that comes to my mind is to keep index for each code - let's consider famous DOOM codes - IDDQD and IDKFA, in a...

c# capture Ctrl+PageUp keystroke

Hello, I am having trouble capturing Ctrl+PageUp keystroke in a ListView control in WinForms application. I am using this code to capture keystrokes - private void ListViewEx_KeyDown(object sender, KeyEventArgs e) { ... if(e.Control){ if((e.KeyCode ^ Keys.Left) == 0) MessageBox.Show("Left"); //shows messagebox else if((e.KeyCode...

Override default behavior of SPACE key in .net WinForms ListView

Hello, I'd like to implement some custom behavior of Space key in a ListView. Basically I'd like to toggle selected status of the item under cursor - that should be fairly simple this.FocusedItem.Selected = !this.FocusedItem.Selected; but alas, it also does the default action, which is to select the focused item. This way I am unable...

How to disable backspace if anything other than input field is focused on using jquery

How do I disable backspace keystroke if anything other than 2 specific input fields are focused on using jquery? here is my current code (NOW INCLUDING 2 TEXTBOXES): $(document).keypress(function(e){ var elid = $(document.activeElement).attr('id'); if(e.keyCode === 8 && elid != 'textbox1' || elid != 'textbox2'){ return false;...

Sending keystrokes to a program

In window form, I made a button and I'm trying to make it send F1 to a specific window (Such as FireFox, My Computer, etc...) My questions are : How do I do it by the window's name? (such as "Mozilla Firefox") How do I do it by the process's name? (such as firefox.exe) ...

What does the 0x80 code mean when referring to keyboard controls

Hi, what does the 0x80 code mean when referring to the keyboard controls in C++ Windows environment? For example, if(GetKeyState('K') & 0x80) { //do something } Thanks everyone! ...

How do you send a key command using an NSTimer to a hidden application?

I am trying to write an app for Toontown that will send the "end" key when the application is minimized or hidden. How do I do this. I cant figure it out Thanks ...

Cancel a keystroke in jQuery

Is is possible (cross-browser compatible) to CANCEL a keystroke after a user has made it (for example on a textbox) The code I currently use edits the textbox value after the keystroke has been displayed: $('.number').keypress(function() { this.value = this.value.replace(/[^0-9\.]/g, ''); }); ...

Keystroke working in IE not in Firefox.

I am just trying a simple application, to make the browser fullscreen. this is working for Internet Explorer, but not for firefox. Also I want to know, that can the same thing be done in Mac OC? do i have to make changes for Mac OS (using safari, firefox etc) the code it below. <html> <head> <script type="text/javascript"> funct...

Bulk data load in to a work flow engine?

Hi, So we are using a workflow management tool(BPM tool). each activity has a bunch of data elements and certain javascript stuff etc. So my question is, how can I automate a process which would intern use this work flow engine(mainly human tasks/activities) and fill out the data that we have and continue. My first thought was to use ...

Is there .net classes which help to process about global keyboard keystrokes ?

Hello Everybody Title explain my question exactly.I have no knowledge about Windows API and i always found it very very annoying.So is there native .net classes which will help us about global shortkeys determining ? ...

Capturing specific keystrokes from a Listbox

Hello. I'm trying to make my main window to receive notifications when user presses a Delete key on a listbox's item. I've tried this: case WM_CHARTOITEM: if( lParam == (LPARAM)hwndListBox ) { sprintf( debug, "0x%x", LOWORD(wParam) ); MessageBoxA(0, debug, 0, 0); } break; .....

how to send keystrokes in IE8 in a particular tab using c#

Hello Experts, As microsoft have not released the tab's API, its quiet difficult for me to work around to sending keystrokes to a particular IE7/8 tab browser using c#/vb.net. I tried to get HWND(handler) of each browser's tab but its a same for all, so if its there something unique which I can get a hold on would be great. Thanks in...