i've drawn an ellipse sprite and added it to the display list of a container, which is added to the display list of the stage. to move the sprites with the keyboard arrows, it appears that my shiftModifier:Number variable is not working when the stage's display state is set to full screen. shiftModifier works as it should when the stag...
So I have the following code, which should append 'true' to the div "test" every 25ms as long as key 68 (the d key) is being pressed, right?
<html>
<body>
<div id="test"></div>
<script type="text/javascript">
var key=false;
var keyDown=function(e) {
if (e.keyCode==68) {
key=true;
}
}
var keyUp=function(e) {
if (e.keyCode==68) {
k...
I am trying to add an "KeyPress" event in a textbox (WinForm)
this.textBox1.KeyPress += new System.Windows.Forms.KeyPressEventHandler(CheckKeys);
and here's inside the 'CheckKeys':
private void CheckKeys(object sender, System.Windows.Forms.KeyPressEventArgs e)
{
if (e.KeyChar == (char)13)
{
// Enter is pressed - do so...
I am writing a Tetris clone in WPF. If I hold down the right arrow key, the current piece shifts right. For playability, I want to allow the user to press another key (i.e. F-key) and rotate the moving piece without having to let go of the right arrow key first. Currently when I do this, the piece stops shifting.
My first basic attempt ...
Is it possible to check for pressed keys without using the KeyboardEvent?
I have an ENTER_FRAME event setup called enterFrameHandler and I want to check within the function enterFrameHandler if any keys are pressed.
normally when using a KeyboardEvent I could check for keys easily using a switch that checks the KeyCode of the event, bu...
I have implemented a simple linux shell in c. Now, I am adding some features and one I immediately thought about was to be able to show the last commands with the up arrow.
Question 1:
However, I have no idea how to accomplish this. Do you?
Question 2:
Any comment on how to store the "history" commands are also appreciated. I suppose s...
I have a movieclip called keyCButton that I want to add a keyboardEvent ("C" Key) to. This will play an animation from frames 2-30 with a sound.
I have watched a few tutorials but still haven't gotten the correct information to make it work. The following is my code.
stage.addEventListener(KeyboardEvent.KEY_DOWN, cNote);
function cNote(...
I was given an unusual request recently that I'm having the most difficult time addressing that involves capturing all display-characters when typed into a text box. The set up is as follows:
I have a text box that has a maxlength of 10 characters. When the user attempts to type more than 10 characters, I need to notify the user that th...
I'm writing a game in Java, right now it's Swing + JOGL - a JFrame with a GLCanvas.
I handle input using keyPressed etc. events (jframe.addKeyListener(...)) and it doesn't seem to work properly:
when I have 3+ keys down at the same time, they don't register properly - apparently this is keyboard's fault, I have to find an alternate co...
hello, how would i read keystrokes using the win32 api? i would also like to see them from international keyboards like german umlauts.
thanks
...
when I press 'enter' in contenteditable area a new <div> is produced what I rather want to add <br /> tag. How can I manipulate this behaviour. How is it done in WYMeditor. Is there any other method than preventdefault() and handle it ?
...
I want to capture keystrokes when the focus in on a panel in java. What should i do?
I am using Netbeans as the IDE. I tried adding keyTyped event but it doesnot work.
Here goes my code
import com.lanadmin.Interface.ClientInterface;
import java.awt.Toolkit;
import java.awt.event.InputEvent;
import java.awt.event.MouseEvent;
import jav...
As i understand it, when a keyboard button is pressed it should invoke the KeyDown event for the control which has focus. Then, the KeyDown for the parent control, so on and so forth until it reaches main form. UNLESS - along the chain one of the EventHandlers did:
e.SuppressKeyPress = true;
e.Handled = true;
In my case, KeyDown eve...
Is there any way to send a key press to a DirectX application using Windows API without activating its window?
I know there is a solution for simple applications, but DirectX handles this quite different...
The solution is preferred in C++, and libraries are OK.
Thanks!
...
Language: Java/GWT
Platform: Ubuntu/Firefox
I need to listen for arrow keys pressed in a TextBox. It seems that pressing up and down does not generate keypressevents for some reason. Instead I tried giving focus to a focus panel, handling the arrow keys and passing any other events to the TextBox, but the delegation has no effect. I've ...
Hi, Im writing a server to receive key events from an iPhone. I can send a message from the iPhone and have my server display it, on the Mac, now i just need to translate that into a Key press, and simulate that press in Cocoa.
Could anyone offer me a starting point, as i guess this is quite low level.
Thanks
...
Hey Guys
I have an app that only has one text field and I want that text field active with the keyboard active when the view loads.
Is there any way to force it?
James
...
How can I disable swipeLeft()/swipeRight() methods, because it intercepts onRelease() method then I quickly moves the finger?
...
I have a simple application that controls my media player with a combination of key presses. Unfortunately however it requires a ctrl key so rather than using postmessage I have to use a keyboardevent.
This can by quite annoying when typing as you can imagine (you press p and all of a sudden the print dialogue box opens). So I am lookin...
How can I capture Ctrl + Alt + K + P keys on a C# form?
thanks
...