Questions tagged [keyboard]

A text input device. Use this tag to ask programming questions related to typing, keyboard hiding and more.

keyboard
Filter by
Sorted by
Tagged with
833 votes
19 answers
280k views

Xcode 6: Keyboard does not show up in simulator

The keyboard does not show up when I run the simulator and click in the UITextView. How do I re-enable the keyboard? It used to work but now it doesn't - I don't know what I might have clicked by ...
Katsu's user avatar
  • 8,676
726 votes
26 answers
88k views

Using a piano keyboard as a computer keyboard [closed]

I have RSI problems and have tried 30 different computer keyboards which all caused me pain. Playing piano does not cause me pain. I have played piano for around 20 years without any pain issues. I ...
620 votes
34 answers
472k views

Run javascript function when user finishes typing instead of on key up?

I want to trigger an ajax request when the user has finished typing in a text box. I don't want it to run the function on every time the user types a letter because that would result in A LOT of ajax ...
David Zorychta's user avatar
547 votes
49 answers
475k views

How to show soft-keyboard when edittext is focused

I want to automatically show the soft-keyboard when an EditText is focused (if the device does not have a physical keyboard) and I have two problems: When my Activity is displayed, my EditText is ...
Ludovic Landry's user avatar
501 votes
34 answers
371k views

How can I dismiss the on screen keyboard?

I am collecting user input with a TextFormField and when the user presses a FloatingActionButton indicating they are done, I want to dismiss the on screen keyboard. How do I make the keyboard go away ...
Collin Jackson's user avatar
487 votes
30 answers
401k views

Android: How do I prevent the soft keyboard from pushing my view up?

I have a vertical sliding drawer at the bottom of my app. When the soft keyboard opens, it pushes the tab for the drawer up, so it sits atop the keyboard. I actually want it to remain at the bottom of ...
Christopher Perry's user avatar
442 votes
16 answers
370k views

Binding arrow keys in JS/jQuery

How do I go about binding a function to left and right arrow keys in Javascript and/or jQuery? I looked at the js-hotkey plugin for jQuery (wraps the built-in bind function to add an argument to ...
Alex S's user avatar
  • 25.6k
401 votes
34 answers
326k views

How to dismiss keyboard for UITextView with return key?

In IB's library, the introduction tells us that when the return key is pressed, the keyboard for UITextView will disappear. But actually the return key can only act as '\n'. I can add a button and ...
Chilly Zhong's user avatar
  • 16.8k
377 votes
33 answers
357k views

Android: show soft keyboard automatically when focus is on an EditText

I'm showing an input box using AlertDialog. The EditText inside the dialog itself is automatically focused when I call AlertDialog.show(), but the soft keyboard is not automatically shown. How do I ...
Randy Sugianto 'Yuku''s user avatar
333 votes
38 answers
363k views

How do I detect if software keyboard is visible on Android Device or not?

Is there a way in Android to detect if the software (a.k.a. "soft") keyboard is visible on screen?
andreea's user avatar
  • 3,495
288 votes
24 answers
287k views

When the keyboard appears, the Flutter widgets resize. How to prevent this?

I have a Column of Expanded widgets like this: return new Container( child: new Column( crossAxisAlignment: CrossAxisAlignment.stretch, children: <Widget>[ new ...
Mary's user avatar
  • 19.6k
273 votes
31 answers
130k views

How do you tell if caps lock is on using JavaScript?

How do you tell if caps lock is on using JavaScript? One caveat though: I did google it and the best solution I could find was to attach an onkeypress event to every input, then check each time if ...
nickf's user avatar
  • 542k
258 votes
16 answers
366k views

Phone: numeric keyboard for text input

Is there a way to force the number keyboard to come up on the phone for an <input type="text">? I just realized that <input type="number"> in HTML5 is for “floating-point numbers”, so it ...
Tami's user avatar
  • 3,311
258 votes
45 answers
211k views

Making a UITableView scroll when text field is selected

After a lot of trial and error, I'm giving up and asking the question. I've seen a lot of people with similar problems but can't get all the answers to work right. I have a UITableView which is ...
233 votes
38 answers
269k views

Move textfield when keyboard appears swift

I'm using Swift for programing with iOS and I'm using this code to move the UITextField, but it does not work. I call the function keyboardWillShow correctly, but the textfield doesn't move. I'm using ...
Pedro Manfredi's user avatar
211 votes
31 answers
193k views

How to hide soft input keyboard on flutter after clicking outside TextField/anywhere on screen?

Currently, I know the method of hiding the soft keyboard using this code, by onTap methods of any widget. FocusScope.of(context).requestFocus(new FocusNode()); But I want to hide the soft keyboard by ...
Ammy Kang's user avatar
  • 12k
209 votes
8 answers
58k views

How to allow keyboard focus of links in Firefox?

Go to this ultra-simple fiddle in a Webkit browser and click on on of the inputs: http://jsfiddle.net/eK4TT/ <input type="text"> <input type="text"> <input type="text"> <a href="...
Ben's user avatar
  • 11.3k
194 votes
36 answers
126k views

How to hide keyboard when using SwiftUI?

How to hide keyboard using SwiftUI for below cases? Case 1 I have TextField and I need to hide the keyboard when the user clicks the return button. Case 2 I have TextField and I need to hide the ...
Hitesh Surani's user avatar
187 votes
9 answers
67k views

How to disable generating special characters when pressing the `alt+a`/`option+a` keybinding in Mac OS (`⌥+a` )? [closed]

There is a behavior in my mac that I'm trying to disable. When I'm in any text editor and typing a key combination using the alt/option+any letter, the output will be special characters. For example: ...
ximyu's user avatar
  • 2,599
180 votes
8 answers
42k views

Super slow lag/delay on initial keyboard animation of UITextField

It takes roughly 3-4 seconds for the keyboard to pop up after I touch my UITextField. This only occurs on the first time the keyboard pops up since the app launched, afterwards the animation starts ...
Vadoff's user avatar
  • 9,319
176 votes
6 answers
105k views

How to detect modifier key states in WPF?

Is there some global constructs that I can use whenever I need to access whether the Control, Shift, Alt buttons are down? For instance inside MouseDown event of a TreeView. If so how?
Joan Venge's user avatar
  • 324k
173 votes
25 answers
207k views

Move a view up only when the keyboard covers an input field

I am trying to build an input screen for the iPhone. The screen has a number of input fields. Most of them on the top of the screen, but two fields are at the bottom. When the user tries to edit the ...
John Allijn's user avatar
  • 1,955
165 votes
9 answers
49k views

Resharper Ctrl-T mapping lost

I seem to have lost the Resharper Ctrl+T mapping to find classes quickly, I tried the solutions described here: Keyboard shortcuts are not active in Visual Studio with Resharper installed ...
Spikee's user avatar
  • 4,280
159 votes
9 answers
390k views

keycode 13 is for which key

Which is the key on the keyboard having the keycode as 13? switch(key) { case 37: $.keynav.goLeft(); break; case 38: $.keynav.goUp(); break; case 39: $.keynav.goRight(); ...
Roadrunner's user avatar
  • 1,673
155 votes
13 answers
189k views

How do I show the number keyboard on an EditText in android?

I just basically want to switch to the number pad mode as soon a certain EditText has the focus.
Chiwai Chan's user avatar
  • 4,796
148 votes
9 answers
282k views

How can you make a custom keyboard in Android? [closed]

I want to make a custom keyboard. I don't know how to do it using XML and Java. The following picture is a model of the keyboard I want to make. It only needs numbers.
XX_brother's user avatar
  • 1,657
146 votes
8 answers
77k views

Hide keyboard when scroll UITableView

In my app i want hide keyboard when i start scrolling UITableView. I search about this in internet, and most answer is subclassing UITableView (http://stackoverflow.com/questions/3499810/tapping-a-...
olegi's user avatar
  • 2,061
145 votes
17 answers
159k views

How do I make an Android EditView 'Done' button and hide the keyboard when clicked?

When the user clicks on the EditView, Android opens the keyboard so that user can write in the EditView. The problem is, when the user is done writing, there is no way to hide the keyboard. The user ...
d-man's user avatar
  • 57.8k
138 votes
12 answers
285k views

How to detect the currently pressed key?

In Windows Forms, you can know, at any time, the current position of the cursor thanks to the Cursors class. The same thing doesn't seem to be available for the keyboard. Is it possible to know if, ...
user avatar
137 votes
5 answers
537k views

How to read keyboard input?

I would like to read data from the keyboard in Python. I tried this code: nb = input('Choose a number') print('Number%s \n' % (nb)) But it doesn't work, either with eclipse nor in the terminal, it's ...
tranen's user avatar
  • 1,373
135 votes
11 answers
116k views

Xcode iOS 8 Keyboard types not supported

I have a UITextField Ctrl-dragged as an @Outlet in my .swift class. Now in viewDidLoad i'm using this code self.myTextField.keyboardType = UIKeyboardType.DecimalPad When i launch my app on simulator ...
r4id4's user avatar
  • 6,017
133 votes
5 answers
30k views

Vim users, where do you rest your right hand? [closed]

Longtime vim users, do you keep your fingers onjkl; or hjkl in normal mode? Standard touch typing teaches us the home position for the right hand has the index finger on the j key, so your fingers ...
Sukotto's user avatar
  • 2,502
129 votes
21 answers
131k views

How can I programmatically check whether a keyboard is present in iOS app?

I need to check the condition of keyboard visibility in my iOS app. Pseudocode: if(keyboardIsPresentOnWindow) { //Do action 1 } else if (keyboardIsNotPresentOnWindow) { //Do action 2 } How ...
Jitendra Singh's user avatar
128 votes
16 answers
185k views

Check if a key is down?

Is there a way to detect if a key is currently down in JavaScript? I know about the "keydown" event, but that's not what I need. Some time AFTER the key is pressed, I want to be able to detect if it ...
Daniel X Moore's user avatar
122 votes
18 answers
89k views

iPhone Keyboard Covers UITextField

I have an app where, in Interface Builder, I set up a UIView that has a text field near the bottom of the view. When I run the app and try to enter text into that field, the keyboard slides up ...
Cruinh's user avatar
  • 3,711
121 votes
20 answers
195k views

How to dismiss keyboard iOS programmatically when pressing return

I created a UITextField programmatically making the UITextField a property of the viewController. I need to dismiss the keyboard with the return and the touch on the screen. I was able to get the ...
noobsmcgoobs's user avatar
  • 2,746
118 votes
5 answers
91k views

How can I check if a key is pressed during the click event with jQuery?

I would like to catch a click event with jQuery and be able to tell if a key was pressed at the same time so I can fork within the callback function based on the keypress event. For example: $("...
daniel smith's user avatar
  • 1,181
117 votes
31 answers
80k views

Not able to type in textfield in iphone simulator using Mac Keyboard?

I'm working on a basic iOS app which supports both portrait and landscape modes. When the iPhone simulator keyboard is open in landscape and I'm switching the app to portrait mode I'm unable to type ...
Deepak Carpenter's user avatar
112 votes
4 answers
110k views

How to develop a soft keyboard for Android? [closed]

I would like to play around with some ideas and develop a soft keyboard for Android to replace the default one. Is there any general information about soft keyboard development for Android out there? ...
znq's user avatar
  • 44.8k
111 votes
9 answers
87k views

How to remove auto focus/keyboard popup of a field when the screen shows up?

I have a screen where the first field is an EditText, and it gains the focus at startup, also popups the numeric input type, which is very annoying How can I make sure that when the activity is ...
Pentium10's user avatar
  • 206k
110 votes
6 answers
250k views

How do I detect keypresses in Javascript?

After looking around on the internet, I've seen a lot of suggestions (use window.onkeypress, use jQuery, etc.) but for almost every option there's a counterargument. How can I detect a keypress in ...
bobismijnnaam's user avatar
110 votes
8 answers
179k views

How to force keyboard with numbers in mobile website in Android

I have a mobile website and it has some HTML input elements in it, like this: <input type="text" name="txtAccessoryCost" size="6" /> I have embedded the site into a WebView for possible ...
ncakmak's user avatar
  • 4,024
103 votes
9 answers
165k views

prevent mobile default keyboard when focusing an <input> from showing

this is how i'm trying <script type="text/javascript"> $(document).ready(function(){ $('#dateIn,#dateOut').click(function(e){ e.preventDefault(); }); }); </script&...
Toni Michel Caubet's user avatar
102 votes
8 answers
146k views

Use "ENTER" key on softkeyboard instead of clicking button

Hello I've got a searched EditText and search Button. When I type the searched text, I'd like to use ENTER key on softkeyboard instead of search Button to activate search function. Thanks for help in ...
peter.o's user avatar
  • 3,500
102 votes
8 answers
136k views

Where can I find a list of Mac virtual key codes?

I'm using CGEventCreateKeyboardEvent and need to know what CGKeyCode values to use. Specifically, I am after the key code for the Command key. The docs give examples for other keys: z is 6, shift is ...
Nick Moore's user avatar
  • 15.7k
101 votes
4 answers
107k views

How to detect when a TextField is selected in Flutter?

I have a Flutter TextField which gets covered by the soft keyboard when the field is selected. I need to scroll the field up and out of the way when the keyboard is displayed. This is a pretty common ...
user2785693's user avatar
  • 1,045
99 votes
20 answers
104k views

Automatic popping up keyboard on start Activity

I got a relative simple question. I have an activity with a lot of EditText's in them. When I open the activity it automatically focusses to the first EditText and displays the virtual keyboard. How ...
Galip's user avatar
  • 5,455
99 votes
23 answers
54k views

Really weird eclipse keyboard behavior/bug?

I am using Helios on Mac Snow Leopard. I don't know why but all of a sudden my arrow keys and delete button start not working only on Eclipse (so Eclipse ignores them) but the rest of the buttons ...
Aleyna's user avatar
  • 1,857
94 votes
7 answers
69k views

Programmatically align a toolbar on top of the iPhone keyboard

In several cases I want to add a toolbar to the top of the iPhone keyboard (as in iPhone Safari when you're navigating form elements, for example). Currently I am specifying the toolbar's rectangle ...
Rob Drimmie's user avatar
  • 1,586
90 votes
15 answers
199k views

Handling key-press events (F1-F12) using JavaScript and jQuery, cross-browser

I want to handle F1-F12 keys using JavaScript and jQuery. I am not sure what pitfalls there are to avoid, and I am not currently able to test implementations in any other browsers than Internet ...
cllpse's user avatar
  • 21.6k

1
2 3 4 5
255