keyboard

Change keyboard layout with python?

孤街浪徒 提交于 2019-12-31 03:15:09
问题 I'm working on a college system (windows XP) and want to set the keyboard to Dvorak when I log on. I currently have a python script that changes the desktop image. Can I use python to change the layout as well? Or are there other ways? 回答1: to Change keyboard layout import win32api win32api.LoadKeyboardLayout('00000409',1) # to switch to english win32api.LoadKeyboardLayout('00000401',1) # to switch to arabic and for Dvorak : win32api.LoadKeyboardLayout("00010409",1) or win32api

How to change iOS device keyboard to specific language

北城以北 提交于 2019-12-31 02:58:19
问题 In iOS, the developer can get the current device language and locale. However, what if we want to set the keyboard to a specific language/locale, based on the users' preferences, when they are in different parts of our app? In my app, there are multiple languages, and I want the user to be presented with the Arabic keyboard, for example, when they are in the Arabic section, and the Russian keyboard, for example, when they are in the Russian section. How is it possible to pull this off? 回答1:

InputType of EditText in Android

邮差的信 提交于 2019-12-31 02:33:07
问题 I would like to have following: - number keyboard should be displayed first - but it should be possible to change to text keyboard and to type some letters. I've asked almost the same question and accepted an answer. InputType of EditText in Android But now I found some strange behaviour, setting InputType to Number : it is possible to change keyboard to text type, but it's impossible to type some text. Any Ideas, why does it happen_ Does anybody know how to use TYPE_MASK_CLASS as input type?

JavaFX WebView / WebEngine show on-screen-keyboard automatically for each text input

荒凉一梦 提交于 2019-12-31 02:25:08
问题 Background/Context: I am developing touch screen based kiosk application with JavaFX. The app integrates browser – WebView. The problem is that all user inputs have to be made through on screen keyboard (SW keyboard) It would be nice to have an option to register an event-handler on WebView/WebEngine for any HTML text input element got/lost focus, so that I could show/hide on-screen-keyboard. Even though I searched the Internet, I did not find this kind of feature. My questions: Does JavaFX /

Keyboard Input with swing Java

为君一笑 提交于 2019-12-31 02:15:13
问题 I am working a calculator using java swing and I want to be able to enter the numbers and operations via keyboard. I can't seem to get it working. import java.awt.*; import javax.swing.*; import java.awt.event.*; public class Calculator extends JFrame implements ActionListener { JPanel[] row = new JPanel[6]; JButton[] button = new JButton[23]; JMenuBar menubar = new JMenuBar(); JMenu file = new JMenu("File"); JMenuItem clear = new JMenuItem("Clear"); JMenuItem exit = new JMenuItem("Exit");

How to prevent the keyboard from showing (not dismissing) on a TextView?

喜欢而已 提交于 2019-12-31 01:11:11
问题 I would like to know how to DISABLE (not how to dismiss) the iOS keyboard in a TextView. I don`t even want the keyboard to show up when the user touches the TextView. All of the examples I found were to make the keyboard disappear AFTER it appears. The closest thing I got was to set textView.userInteractionEnabled = NO; but that gets rid of the scrolling as well ( I want to keep the scrolling ). Thank you in advance!! 回答1: Try to implement the following method in text view's delegate: - (BOOL

How to dismiss UIKeyboardTypeNumberPad?

折月煮酒 提交于 2019-12-30 10:59:09
问题 I'm trying to hide the number pad, but I do not want to implement a button. Is there a way to dismiss the number pad when the user taps outside the textfield? 回答1: This is one of those questions where you read it and say "That's easy you just..". And then you go to do it and make it super complicated. And then realize it doesn't have to be that complicated. The answer I've come up with, and I'm sure it will help someone else, Is to use an invisible UIView that never interacts but acts on

How to dismiss UIKeyboardTypeNumberPad?

你说的曾经没有我的故事 提交于 2019-12-30 10:59:04
问题 I'm trying to hide the number pad, but I do not want to implement a button. Is there a way to dismiss the number pad when the user taps outside the textfield? 回答1: This is one of those questions where you read it and say "That's easy you just..". And then you go to do it and make it super complicated. And then realize it doesn't have to be that complicated. The answer I've come up with, and I'm sure it will help someone else, Is to use an invisible UIView that never interacts but acts on

Flash & Flex SDK/AS3 - How to keep keyboard focus?

我的未来我决定 提交于 2019-12-30 09:54:07
问题 I'm writing a flash application in Flex/AS3, and I can't seem to assign keyboard focus to it. I was mindful of this problem early on in development and added a splash screen with a "play now" button, to entice the user to click. However, the user must then click a second time on the application for the keyboard to work! To make matters worse, I have an in-game shortcut that returns you to the main menu. If you return to the main menu then click the "play now" button, the SWF loses focus again

Low level keyboard input from Windows

不羁的心 提交于 2019-12-30 06:43:18
问题 What win32 calls can be used to detect key press events globally (not just for 1 window, I'd like to get a message EVERY time a key is pressed), from a windows service? 回答1: You want to use Win32 Hooks. In particular a keyboard hook. You can read more about it here The type of hook you want is WH_KEYBOARD and you can set it via the Win32 API SetWindowsHookEx. Basically windows will call a function in a dll that you create everytime a key is pressed in any application system wide. The hook