keyboard

How to create a list of Keyboards. Extract KLID from HKL?

时光毁灭记忆、已成空白 提交于 2021-01-28 05:08:33
问题 Windows 10 / C++ / Win32 I need to make a list of 'installed' Keyboards. The components of my 'list' needs to contain: The HKL for the keyboard. The KLID for the keyboard. The values of the registry values obtained from: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layouts Example: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000409 Value: Layout File Value: Layout Text The only way I am aware of enumerating Keyboards is via GetKeyboardLayoutList() ,

OCaml read pressed key without graphical window

喜欢而已 提交于 2021-01-28 04:05:50
问题 Edit. I am working in a Windows environment. I want to write a simple game in console output with OCaml. I need to be able to use a 'read_key' function. But : The graphics module throws an error : Exception: Graphics.Graphic_failure "graphic screen not opened". But I do not want to open the graphic window. The function read_line forces the user to press "return" after every key press... 回答1: It is not possible to implement such function using pure OCaml. You will need to call to platform

Soft keyboard pushing layout

南笙酒味 提交于 2021-01-28 02:29:27
问题 I have been trying many solutions out there for preventing the soft keyboard from pushing my layout when it appears. However, all solutions did not work. Simply, I want everything in my layout (buttons, imageViews, Background, textViews, textEdits) to stay in place when soft keyboard is shown. I do not care about what it will cover. I tried all of the following and all produced the same output and do not work: (did not work) I tried writing android:windowSoftInputMode="adjustNothing" in my

Increase just by one when a key is pressed

三世轮回 提交于 2021-01-28 02:25:03
问题 I want to increase the variable "shot_pressed" just by one when the key "s" is pressed no matter how long I pressed. But the result is that the variable keeps on increasing. The longer I pressed, the bigger the value of the variable. Below is a part of my code. import keyboard shot_pressed = 0 if keyboard.is_pressed('s'): shot_pressed += 1 回答1: First of all looks like you use https://pypi.python.org/pypi/keyboard Second, I assume your code is not like you wrote above but like import keyboard

How to detect key down/up when a second key is already held down

你。 提交于 2021-01-27 21:41:18
问题 In my application I allow the user to scroll a movie by holding down the Right arrow key by using ProcessCmdKey . Now I would like to give the user the ability to increase the scrolling speed whenever desired. Ideally the user should be able to hold down the Right arrow key , then when he decides to increase the speed he should, without releasing the Right arrow key , hold down also the Shift key and when he decides to go back to the normal speed he should simply release back the Shift key .

Is there a way to show a number pad (preferably with a bubble) in a TextInput field using Kivy and Python? NEW ISSUE WITH CODE

我的梦境 提交于 2021-01-27 16:18:24
问题 I have an app where you input numbers (a lot) and it gets hard that the keyboard is also letters, I would like it to be just numbers (0-9), and a dot. Is there any way to do this using Kivy's .kv file and Python? I have tried input_type: 'number' in the .kv file, but I couldn't get it to work. Thanks! Edit: I have also tried using bubbles, no luck. Although, it would be nice to have a bubble number pad if possible. Edit 2: I have put another bounty on this question because when I put the

Is there a way to show a number pad (preferably with a bubble) in a TextInput field using Kivy and Python? NEW ISSUE WITH CODE

陌路散爱 提交于 2021-01-27 16:16:18
问题 I have an app where you input numbers (a lot) and it gets hard that the keyboard is also letters, I would like it to be just numbers (0-9), and a dot. Is there any way to do this using Kivy's .kv file and Python? I have tried input_type: 'number' in the .kv file, but I couldn't get it to work. Thanks! Edit: I have also tried using bubbles, no luck. Although, it would be nice to have a bubble number pad if possible. Edit 2: I have put another bounty on this question because when I put the

Disable Android keyboard in qml application

久未见 提交于 2021-01-27 13:01:56
问题 I'm porting an existing QML/C++ application to the Android system. The application is already running on the Android tablet, but I have issues with Android keyboard. Since my QML/C++ application has implemented its own keyboard, I would like to disable an Android one. I've tried to add android:windowSoftInputMode="stateAlwaysHidden" line in AndroidManifest.xml file, but keyboard still appears when I press an edit box. Since I'm porting an existing application, I do not want to edit the code

How to check current keyboard language in java

无人久伴 提交于 2021-01-27 06:37:43
问题 is there a way in java to check what is the keyboard language in the current program? example: Chrome : english Eclipse: english Skype: spanish Chrome: english (i can get the current program by jna - external library) thanks very much ! 回答1: Try this: import java.awt.im.*; public class _Test { public static void main(String[] args) { InputContext context = InputContext.getInstance(); System.out.println(context.getLocale().toString()); } } 来源: https://stackoverflow.com/questions/17150993/how

Android virtual keyboard turn on caps lock

痴心易碎 提交于 2021-01-27 03:51:01
问题 I have an edit text field. When the user clicks on it by default it shows small letters on the virtual keyboard. I want by default to display first letter caps and rest of them small on the keyboard. How can this be done? 回答1: Try adding android:capitalize="sentences" to the definition of the EditText in your Layout file. This should capitalize the first character of the sentence. If you want to begin each word with a capital letter use words. More about this can be found in the API. 回答2: