Questions tagged [keyboard]

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

What topics don't belong here?

If your question is about:

  • Making a (physical) keyboard: See electronics.SX. (Of course, if you want to implement/imitate a keyboard in software — e.g. an on-screen keyboard — then go right ahead and ask.)

  • Configuring your keyboard: See superuser.com, unix.SX, or another site that covers using computer systems — Stack Overflow is about programming them.

  • Interfacing with a device resembling a piano: This is not the tag you're looking for. Move along.

12648 questions
203
votes
6 answers

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/ my first link my second link my…
Ben
  • 11,082
  • 8
  • 33
  • 47
195
votes
28 answers

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 clicking outside of TextField or anywhere on the…
Ammy Kang
  • 11,283
  • 21
  • 46
  • 68
183
votes
35 answers

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 keyboard when the user taps outside. How I can do this…
Hitesh Surani
  • 12,733
  • 6
  • 54
  • 65
177
votes
9 answers

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

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: the combination alt+a will generate å. the…
ximyu
  • 2,489
  • 3
  • 19
  • 16
175
votes
7 answers

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 instantly. At first I thought it was problem of…
Vadoff
  • 9,219
  • 6
  • 43
  • 39
173
votes
6 answers

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
  • 315,713
  • 212
  • 479
  • 689
172
votes
25 answers

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 text on the bottom of the screen, the keyboard…
John Allijn
  • 1,945
  • 3
  • 12
  • 9
161
votes
9 answers

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 Specifically the accepted answer: I would first try…
Spikee
  • 3,967
  • 7
  • 35
  • 68
154
votes
9 answers

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(); break; case 40: $.keynav.goDown(); …
Roadrunner
  • 1,623
  • 2
  • 11
  • 7
154
votes
13 answers

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
  • 4,716
  • 4
  • 30
  • 33
148
votes
9 answers

How can you make a custom keyboard in Android?

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
  • 1,657
  • 4
  • 18
  • 15
145
votes
8 answers

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-uiscrollview-to-hide-the-keyboard). I made subclass…
olegi
  • 2,051
  • 3
  • 16
  • 9
145
votes
17 answers

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 has to press the back button to hide the…
d-man
  • 57,473
  • 85
  • 212
  • 296
138
votes
12 answers

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, for example, the Shift key is pressed? Is it…
NorthWind
134
votes
11 answers

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 and click on the UITextField i got this log …
r4id4
  • 5,877
  • 8
  • 46
  • 76