keyboard

ANDROID - Numeric keyboard

核能气质少年 提交于 2020-01-03 03:14:10
问题 Good afternoon. I have an EditText that may contain numbers and letters. By deploying the keyboard, is there any way to deploy it in numerical form?. If I put the EditText as numeric I do, but that's not my case. Thank you very much. 回答1: Try this: EditText myEditText = (EditText)findViewById(R.id.myEditText); myEditText.setInputType(InputType.TYPE_NUMBER_FLAG_DECIMAL); Then set it back to alphanumeric when you are done with numeric.. 回答2: You can: Hide/Show different EditTexts that have

If I send a WM_KEYDOWN message (using wndproc) will the computer hold the key down until I send WM_KEYUP?

我与影子孤独终老i 提交于 2020-01-03 02:53:11
问题 I am looking for a solution to programmatically hold a keyboard key down during some time (I don't know how many time). I think that if I send a WM_KEYDOWN message the key will be held down until WM_KEYUP is send, but I am not sure. I would test it. But I need to go and I don't have much time. I want to see if someone already tested this. Here is an other question I posted, related to this one. I want to make a virtual keyboard. Do I need to send WM_KEYDOWN to the current active window or

Java - GetLockingState() won't update

荒凉一梦 提交于 2020-01-03 02:22:18
问题 Found bug Java Bug "CAPS" doesn't update. I want it to be actively checking the locking state but it only checks it once and stores true/false in "CAPS" but if you hit caps lock it doesn't change the boolean stored in CAPS. Thread capsCheck = new Thread(() -> { while (true) { boolean CAPS = Toolkit.getDefaultToolkit().getLockingKeyState(KeyEvent.VK_CAPS_LOCK); if (CAPS) { System.out.println("Caps enabled"); } else { System.out.println("Caps disabled"); } try { Thread.sleep(2000); } catch

jQuery Key Events with a Search Box

。_饼干妹妹 提交于 2020-01-03 01:46:13
问题 I'm working on an autosuggest plugin with jQuery, and I'd like to add Keypress events so that users can arrow down and up. Also, if they press enter it will add the value to the input. This is what my HTML looks like: <input id="myInput" class="textInput" type="text" name="instructorName"/> <label for="search"> </label> <div id="myInputResults" class="results" style="display: block;"> <ul> <li><a><div class="suggClass">Suggestion #1</div></a></li> <li><a><div class="suggClass">Suggestion #2<

Keyboard size is bigger

萝らか妹 提交于 2020-01-02 22:27:17
问题 I wanna show keyboard smaller but causing problem compare both images , keyboard size is bigger than first image and also vertical spacing between two character is more when i add ratina 4.7 splash screen keyboard showing smaller but my app design causing problem and when i remove 4.7 splash screen working fine but keyboard showing bigger How i can show keyboard smaller without design problem I searched lot but never get solution of this problem 回答1: Same Issue with my App When complete my

how can i get selectedRange.location value?

邮差的信 提交于 2020-01-02 20:10:48
问题 i want to get a cursor position from UITextview, i have implement the code in How to find a pixel-positon of a cursor in UITextView? post, the algorithm is based on algorithm in Pixel-Position of Cursor in UITextView. my problem is, i can't get the selectedRange.location value after keyboard appear in the 2nd time, cause it always tell that the value of location is 2147483647, which means not found. This is my implementation : -(void)getCursorPosition{ NSRange originalPosition = self

how can i get selectedRange.location value?

本小妞迷上赌 提交于 2020-01-02 20:10:02
问题 i want to get a cursor position from UITextview, i have implement the code in How to find a pixel-positon of a cursor in UITextView? post, the algorithm is based on algorithm in Pixel-Position of Cursor in UITextView. my problem is, i can't get the selectedRange.location value after keyboard appear in the 2nd time, cause it always tell that the value of location is 2147483647, which means not found. This is my implementation : -(void)getCursorPosition{ NSRange originalPosition = self

Suppressing keyPress for non-character keys?

人盡茶涼 提交于 2020-01-02 13:55:26
问题 Is there any way to prevent a key like F1 from being pressed? After a short search, I found this website: http://www.cambiaresearch.com/c4/789d4357-60e9-4dbd-8e8c-affb2ebd6960/How-Do-I-Suppress-a-Keystroke-in-a-Browser-Input-Box-Using-Javascript.aspx This way one can suppress keys like 'a' being pressed (it does not get put in the textbox), but keys like 'tab', 'F1' etc. are still working, i.e. the focus does change and, as I'm using Google Chrome, the Chrome help website does pop up. I'm

iOS - NSNotificationCenter multiple UIKeyboard notification

北城余情 提交于 2020-01-02 13:50:15
问题 I have two view controllers let's call them A and B (1) in A I show a popOver containing a textField (2) in B there is an UITextView used for simple text editing I Have to manage the keyboard in A and in B to scroll the content hidden by the keyboard. I know how to reposition the content. What I need is a way to have different behavior on the same notifications types that in my are UIKeyboardWill(Show/Hide)Notification. What I've done so far : (1) I've added this code in each controller [

iOS Support External Keyboard Without Displaying One

此生再无相见时 提交于 2020-01-02 12:16:57
问题 Given a UIViewController , I would like to receive text input only from the external keyboard. Think UIKeyCommand but for any character (not just 'modified' ones). However, when I try to implement that using UIKeyInput , it seems that iOS desperately wants to display a keyboard if there is no external one connected. Is there any way to circumvent that? Specifically, to have the options to receive keystrokes from the keyboard if, and only if, one is connected? 回答1: After fiddling with a iPad