keyboard

How to catch key from keyboard in C#

安稳与你 提交于 2021-02-05 10:43:05
问题 I have a problem. I need write a C# program Input: Allows the user to enter multiple lines of text, press Ctrl + Enter to finish typing Output: Standardize by, rearranging lines in the right order of increasing time. I was tried but I don't know how to catch Ctrl + Enter from keyboard: I expect the output like Example: “Created at 28/02/2018 10:15:35 AM by Andy. Updated at 03/03/2018 02:45:10 PM by Mark Clear name at 02/03/2018 11:34:05 AM by Andy” DateTime is needed rearranging 回答1: You need

How Do I Read Raw Input in C++/CLI

旧街凉风 提交于 2021-01-29 16:52:11
问题 Here's my problem. I am trying to get raw input from attached devices. I am using the information on MSDN to figure it out, but it's been very difficult for me to make sense of some of it. I believe I have successfully created a RAWINPUTDEVICE object and registered a device with RegisterRawInputDevices(). Now I am trying to figure out how to use the GetRawInputDeviceList() and GetRawInputDeviceInfo() functions. The big trouble is trying to understand the parameters they take, which includes a

Soft Keyboard pushed button up above it. How to fix it?

北城余情 提交于 2021-01-29 14:33:01
问题 I have ConstraintLayout with ScorllView and Button below it (attached to bottom of the screen. When I am editing EditText input inside ScrollView. Then appearing keyboard is moving my ScrollView content up (desired behaviour, so I can scroll to the end of it) but it also pushing button up (undesired behaviour). I think I can change windowAdjustMode, maybe I could detect keyboard showing and then hide this button? But this two solutions aren't perfect. XML: <?xml version="1.0" encoding="utf-8"

Dynamically update keyboardType in Flutter

我的梦境 提交于 2021-01-29 10:14:16
问题 I have a search TextFied and a Tabbar allowing to search by a number or a text. When the TabBar is Fired/Tapped the keyboard type should be updated. The listener allowing to detect the type is correctly fired The build method is fired and the Textfield is rebuild with the keyboardType But the keyboard type is not updated _handleTabSelection() { if (_tabController.indexIsChanging) { switch (_tabController.index) { case kNameIndex: _searchBy = RunnersSubscriptionsSearchBy.name; _keyboardType =

Using a string with the SendInput Function on Windows

大城市里の小女人 提交于 2021-01-29 10:11:29
问题 I want to use a std::string for the SendInput() function. After doing some research, I found that the VkKeyScanEx might help but the code needs additional logic for uppercase or special characters. In the latter case I realized that I can simulate a SHIFT key press, send the lowercase key input and then it would come out as uppercase. However, there are also the "special" characters like !"§$%&/()=? which need a held down SHIFT key to come out correctly. Furthermore, there are also the

Trouble Simulating Keystrokes

拈花ヽ惹草 提交于 2021-01-29 03:00:05
问题 I've used WIN32API calls in the past to simulate keystrokes without much trouble. Even now, at a superficial level, it seems to work. I'm using the Win32 SendMessage call to send a WM_KEYDOWN, WM_CHAR, WM_KEYUP message to an instance of Notepad. And sure enough, whatever I send appears in Notepad. But while using Spy++ to inspect the messages; I noticed that my sent Keystrokes were noticeably different than the keys I had actually typed or the ones created using Windows built-in on screen

HTML page scrolls on keydown

≡放荡痞女 提交于 2021-01-28 14:54:15
问题 I have a game in which the player can move using the arrow keys, I when I hit the up or down arrows the screen also moves. Is there a way to disable this? I'm using the following: Local HTML page, Google Chrome, Windows (FYI - the entire page isn't displayed at one time) Here is my code: function moveCharacter() { // left arrow if (keys[37]) { move("left"); } // up arrow if (keys[38]) { move("up"); } // right arrow if (keys[39]) { move("right"); } // down arrow if (keys[40]) { move("down"); }

HTML page scrolls on keydown

若如初见. 提交于 2021-01-28 14:51:44
问题 I have a game in which the player can move using the arrow keys, I when I hit the up or down arrows the screen also moves. Is there a way to disable this? I'm using the following: Local HTML page, Google Chrome, Windows (FYI - the entire page isn't displayed at one time) Here is my code: function moveCharacter() { // left arrow if (keys[37]) { move("left"); } // up arrow if (keys[38]) { move("up"); } // right arrow if (keys[39]) { move("right"); } // down arrow if (keys[40]) { move("down"); }

HTML page scrolls on keydown

▼魔方 西西 提交于 2021-01-28 14:45:53
问题 I have a game in which the player can move using the arrow keys, I when I hit the up or down arrows the screen also moves. Is there a way to disable this? I'm using the following: Local HTML page, Google Chrome, Windows (FYI - the entire page isn't displayed at one time) Here is my code: function moveCharacter() { // left arrow if (keys[37]) { move("left"); } // up arrow if (keys[38]) { move("up"); } // right arrow if (keys[39]) { move("right"); } // down arrow if (keys[40]) { move("down"); }

Android InputMethodEditor layout file. Non-Key/Row elements in the XML?

别说谁变了你拦得住时间么 提交于 2021-01-28 07:09:38
问题 I'm trying to implement a keyboard with a TextView that updates with each keypress, but it won't show up on the screen. It should appear above the top row of letters. When I run the keyboard, the keys show up with an extra row on top but nothing inside <Keyboard xmlns:android="http://schemas.android.com/apk/res/android" android:keyWidth="10%p" android:id="@+id/keyboardView" android:horizontalGap="0px" android:verticalGap="0px" android:keyHeight="60dp" > <Row> <TextView xmlns:android="http:/