keyboard

Softkeyboard in PhoneGap covers input elements

怎甘沉沦 提交于 2020-01-02 07:00:09
问题 I've seen this question a few times, though none of the answers seems to work for me. I suspect I have done something incredibly stupid, and have missed the obvious (+1 for peer programming?) Developing for Android (SDK Version 8+) with PhoneGap (Cordova) 2.0.0. I have a full page form for user settings input, with equally spaced elements running down the page, with cancel and submit buttons at the very bottom. When a user touches the upper elements, the softkeyboard pops up, and there is no

Dismiss the keyboard with MULTIPLE UITextFields?

喜你入骨 提交于 2020-01-02 05:47:10
问题 Is it possible to dismiss the keyboard when you have MULTIPLE UITextFields ? If so how ? As a side note, do I have to dismiss the keyboard for Each and Every field or can it be done globally ? Oh and it would be super cool if I don't have to touch the DONE button, I'd ideally like a solution that where the user touches anything BUT the field in question and the keyboard automagically disappears... Oh and if you'd be so kind step by step instructions. I should have added that I have a method

How can I send keys to another application using delphi 7?

扶醉桌前 提交于 2020-01-02 05:27:14
问题 Ok, so Pretty much i am trying to send keystrokes of a string from and edit box to the active window and the enter key after. does anyone here know a working method of doing this in delphi 7? I have been searching for about an hour and a half for this now and i cant seem to find anything and the stuff I have found is ether for newer versions of delphi, or it just doesn't work. I have tried TTouchKeyboard but that's only for delphi 10 and newer. 回答1: I've used this to send text to an annoying

Reading piano notes on Python

£可爱£侵袭症+ 提交于 2020-01-02 04:34:30
问题 I'd like to listen to the port having my midi output device (a piano) with my RPi, running on Debian. I've looked into pygame.midi, I managed to listen to the port, but somehow can not extract all midi information. Please find code below [edited code snippet] EDIT: Fixed, thanks a lot! 回答1: First of all you need to find out which device-id your keyboard has inside pygame. I wrote this little function to find out: import pygame.midi def print_devices(): for n in range(pygame.midi.get_count()):

iOS SDK: Dismiss keyboard when a button gets clicked?

做~自己de王妃 提交于 2020-01-02 04:32:55
问题 How can I dismiss the keyboard when the user clicks a button? A short example for a better understanding: the user edits some text in some textfields and at the end he doesn't click "Done" or smething else on the keyboard, but he clicks on an button "Save" while the keyboard is still shown. So, how can I now dismiss the keyboard? Thx. Regards, Daniel 回答1: in button action write, if([textField isFirstResponder]){ [textField resignFirstResponder]; } if there are more textfields get the current

Can Javascript press the Enter key for me?

痞子三分冷 提交于 2020-01-02 04:04:42
问题 There's a site that I want to continue to hit enter on while I'm away. Is it possible to do something like setInterval(function(){ //have javascript press the button with a certain id },100); I was thinking of just putting that in the smart search bar so it would run the code. 回答1: Well pressing enter is triggering an event . You would have to figure out which event listener they are listening to. I'll use keyup in the following example: Assume el is the variable for the element you want

Why does the escape key have a delay in Python curses?

你。 提交于 2020-01-02 01:01:13
问题 In the Python curses module, I have observed that there is a roughly 1-second delay between pressing the esc key and getch() returning. This delay does not seem to occur for other keys. Why does this happen and what can I do about it? Test case: import curses import time def get_delay(window, key): while True: start = time.time() ch = window.getch() end = time.time() if ch == key: return end-start def main(stdscr): stdscr.clear() stdscr.nodelay(1) stdscr.addstr("Press ESC") esc_delay = get

How to set Keyboard type of TextField in SwiftUI?

拟墨画扇 提交于 2020-01-02 00:53:11
问题 I can't seem to find any information or figure out how to set the keyboard type on a TextField for SwiftUI. It would also be nice to be able to enable the secure text property, to hide passwords etc. This post shows how to "wrap" a UITextField, but I'd rather not use any UI-controls if I don't have to. How to make TextField become first responder? Anyone have any ideas how this can be done without wrapping an old school UI control? 回答1: To create a field where you can enter secure text you

Detect if phone's keyboard is slid out

只愿长相守 提交于 2020-01-01 19:23:07
问题 I'd like to set focus to an EditText and automatically bring up the virtual keyboard in certain situations. However, if a phone's hardware keyboard is slid out, I wouldn't want to. Is there any way to detect whether or not a phone's hardware keyboard (if one exists) is slid out? Or is there some functionality of the EditText that will handle all this for me? 回答1: if (getResources().getConfiguration().hardKeyboardHidden==Configuration.HARDKEYBOARDHIDDEN_NO) { //do stuff } To dive deeper,

GetKeyState in firemonkey

最后都变了- 提交于 2020-01-01 19:20:08
问题 In VCL (Delphi 2010) I used this function to check whether control key is pressed: function IsControlKeyPressed: Boolean; begin Result := GetKeyState(VK_CONTROL) < 0; end; GetKeyState is function in windows library that I do not want to include it into my project. How can I check if control or shift key is pressed in XE3 for firemonkey application? 回答1: If it helps for anyone else, this is my unit: unit uUtils; interface uses {$IFDEF MSWINDOWS} Winapi.Windows; {$ELSE} Macapi.AppKit; {$ENDIF}