onkeydown

Android: onKeyDown() problem

I would like to create a photo/video capture application. I have created a CaptureView class which extends SurfaceView and placed it in the main form. The main form's activity has onCreateOptionsMenu() method which creates a menu. The menu worked fine but then I tried to implement a method onKeyDown: @Override public boolean onKeyDow...

WPF: OnKeyDown() not being called for space key in control derived from WPF TextBox.

In a WPF application, I have a control that I have derived from TextBox like this: public class SelectableTextBlock : TextBox { protected override void OnKeyDown(KeyEventArgs e) { base.OnKeyDown(e); e.Handled = false; } } The OnKeyDown method is not called when entering a space into the TextBox, nor when hi...

WinForms, Handling all keys = OnKeyPress + OnKeyDown, but how?

I've got one Form, custom drawing, no controls. When I need to get the input from the user I go to OnKeyDown event and then map event's KeyData to a string** - so that I can recognize that user has pressed "ctrl X", etc, so everything is almost ok... the problem is with different keyboard settings and language specific letters - so for...

onKeyListener not working with soft keyboard (Android)

I am using onKeyListener to get the onKey events. It works fine with the normal keyboard. But it does not work with soft keyboard. I am only able to get onKey events for numerics and not alphabets. Is there any workaround to solve this? Any kind of help will be greatly appreciated. ...

[C# event] double execution

Hello, I develop small application in C# but I've problem with events. My form have controlState property which describe current state of application. When application is in SEARCH state and I press enter it exec both KeyDown_Search and KeyDown_Idle method. When I add MessageBox.Show("anything"); at the end of KeyDown_eventManager probl...

How to capture a backspace on the onkeydown event

I have a function that is triggered by the onkeydown event of a textbox. I need to know if the user has hit either the backspace key or the del key. Thanks in advance ...

Why doesn't onkeydown working properly on IE?

function checkEnter(event) { var charcode; if (event && event.which) { charcode = event.which; alert("Case 1. event.which is " + charcode); } else if (event && !event.which) { charcode = event.keyCode; alert("Case 2. event.keyCode is " + charcode); } document.getElementById("text1...

How to submit a form OnKeyPress with Javascript?

Hi! I want to make a form like this, and i want to post the form - with javascript - in all the keydowns. <form action="{$formaction}" enctype="multipart/form-data" method="post"> <input type="text" name="n"> <input type="password" name="pw"> <button name="in" type="submit">enter</button> </form> please tell me how to do this. ...

How to exit grid with ctrl-TAB when grid is on a tabpage (onkeydown works when grid not on tabpage)

winforms .net 3.5 Ultrawingrid 9.2 In my subclass of Ultrawingrid.Ultragrid : Protected Overrides Sub OnKeyDown(ByVal e As System.Windows.Forms.KeyEventArgs) If e.KeyCode = Windows.Forms.Keys.Tab andalso e.control = True then SetFocusToNextControl(True) End if Mybase.OnKeyDown(e) End Sub This works fine. But w...

Can't find asp:textbox in Javascript.

I am trying to add the onkeydown attribute to an asp:textbox. For some reason my code can't find the textbox that is inside a loginview. Am I doing something wrong? <script type="text/javascript"> window.onload = function() { UserName.Attributes.Add("onKeyDown", "KeyDownHandler('" + btn.ClientID + "')"); Password.Attributes.Add...

How to differeniate capital letters from lower ones in onkeydown event handler method

<html> <head> <title>Test</title> <script type="text/javascript"> function showChar(e){ if(e.keyCode!=16) alert( "keyCode: " + e.keyCode + "\n" + "SHIFT key pressed: " + e.shiftKey + "\n" ); } </script> </head> <body onkeydown="showChar(event);"> <p>Press any character key, with or without holding down the SHIFT key.<...

WPF OnKeyUp in UserControl not firing

I have Window with UserControl. I subscribed for OnKeyUp event but it does not firing. Inside UserControl constructor i use method this.Focus(); But still onkeyup does not firing. What is wrong and what i can to do to catch this event? ...

Continuous onkeydown event in Firefox

I have a regular onkeydown event handler that fires a function, like this: window.onkeydown = onKeyDown; It essentially works, but it only captures 1 key in Firefox. Then I have to release it and press again. Google chrome offers me a continuous grab, so I wonder if this is by choice. ...

Capturing onkeydown in Javascript

I have a web front-end to an AS/400 CGI application which allows the use of some of the F1-F24 keys (depending on the page) as well as page-up, page-down etc - these are passed to the underlying application which handles them appropriately. For instance, on a given page, a user could either press the F3 button or press the F3 key - both ...

How do I keep my cursor/caret from moving inside of an input text element?

I'm trying to build a form that works in a manner similar to the Google Search page, as well as Gmail and several other pages (including the this page - see the "Tags" input on the Ask Question page). As text is input, a list of options will appear, and the user can use up and down arrows to select the option they want. The problem I a...

onKeyDown in a service? (Global Hot Keys)

What I'm basically trying to achieve is custom global hot keys or in other words 'things will happen when I push certain buttons no matter which program is currently on top'. I assume a service is needed. I have a quick and dirty test that just tells me what has been pressed that will work if it is the active window. public boolean onK...

JavaScript key handling and browser compatibility

Hi, I'm working on key handling in java script. I have done some research and I'd like to know whether I have a correct understanding of key handling. KeyDown/KeyUp Event The key down and key up events are supported by IE7+ and Firefox 3.5+ I didn't check the earlier versions of the browsers, but I guess that they also support these ev...

How to perform action on keypress?

My code works perfect if I want to perform an action when pressin the ctrl key... $(document).keydown(function(e){ if(e.ctrlKey){ if($('.selected').parent().next().length == 0){ switchTabs($('.selected').parent().parent().find('a:first')); return false; }else{ switchTabs($('.selec...

WPF - Build a string of pressed keys using KeyDown in ListView

I have a listview with a dozen of rows binded to xml. I'd like to have a possibility to locate and position the cursor to a certain record. For example: I have a with these ID, Name, Value: 1, Johny, Cash, USA 2, Jean-Michel, Jarre, France 3, Jeanette, , USA When I would type "Je", the SelectedRow would be positioned to ID 2. When I w...

I have a login form with an event of clicking the enter key to submit the form, it is not working in IE

I have a login form with an event of clicking the enter to submit the form, it is not working in IE <form name="login" action="" method="post"> <ul> <li class="col1">E-mail Address</li> <li class="col2"><input name="email_address" type="text" class="textfiled" /></li> <li class="col1">Password</li> <li class="col2"><inpu...