620 questions
0
votes
0
answers
49
views
How to distinguish between Left/Right trigger with WIN32 raw input?
I am using the raw input API to write a simple program for my Xbox controller. I have followed the basic setup steps from https://learn.microsoft.com/en-us/windows/win32/inputdev/using-raw-input and ...
0
votes
0
answers
22
views
Laptop built in Mousepad and Steam Input Virtual Gamepad don't work with raw input?
I'm trying to make a program in C# that reads button inputs from all your connected mice, keyboards and hid devices. So far it's working without issues on my wired usb mouse, wired and wireless ...
0
votes
1
answer
223
views
How do I get a raw input device's proper display name in C#?
I am making a simple program to enumerate all of the devices currently connected to your Windows along with their pointers, then display the proper name for the device you clicked a button on your WPF ...
0
votes
1
answer
262
views
Getting higher precision win32 timestamps for rawinput than millisecond
I am using raw input as my input api for my game and I was looking to get time stamps for the input presses. But everything I find is at millisecond precision (GetMessageTime()). Which is not good ...
-1
votes
1
answer
371
views
How to use DeviceIoControl on a rawinput device handle
So I have a program that is using multiple keyboards as input using raw input and I want to mess with the indicator lights of caps lock, scroll lock, and num lock per keyboard.
So my approach was to ...
0
votes
0
answers
60
views
how can we creating detection version on python 2 and python 3
Hello there i need some help for a little, i working on python version 3/2, i wanna create a system detection on python script and how can i solve the problem like this:
try:
import platform
...
-3
votes
1
answer
67
views
Why is my Python input overriding itself?
Context:
I'm doing the Udemy "100-days-of-code" course and hit a weird stumbling block.
Python version: 2.7-64
I ultimately solved it by using the "input" command (vs raw_input) ...
0
votes
0
answers
82
views
Can I identify the same RawInput message sent to two different windows?
This question is part of a long story about trying to get input messages, WM_INPUT, from outside of the main window for an application.
The reason is that the main loop's frequency is lower than the ...
0
votes
2
answers
210
views
GetRawInputDeviceInfo with RIDI_DEVICENAME returns invalid memory
In my code I have a call to the GetRawInputDeviceInfo function, passing in the RIDI_DEVICENAME command. It is supposed to fill the 3rd parameter with a string containing the name of the buffer, and ...
0
votes
0
answers
326
views
C# (RawInput, RegisterRawInputDevices)
A function "RegisterRawInputDevices(RawInputDeviceRegistration[] pRawInputDevices, uint uiNumDevices, uint cbSize)" from user32.dll blocks the main GUI thread.
Is there a way to keep GUI ...
0
votes
0
answers
198
views
Is the latency for the sendinput / receiving raw input the same or almost the same for all programs?
I'm using winapi SendInput with scancodes to simulate keyboard input to a game, and at the same time I want to measure the timing of the input being received, but unfortunately I've no access to that ...
0
votes
0
answers
160
views
EOF error with raw_input - Issue executing Python script from a reverse shell
I am currently helping my university's cyber security program by creating a simple Capture the Flag style python script to be used for the final exam. I created the script and everything is working ...
0
votes
1
answer
353
views
Can I get raw mouse input as a WM_INPUT twice?
I am trying to modify an existing application by adding an input gathering thread outside of its main thread.
The original application already processes mouse input pretty decently inside its main ...
0
votes
1
answer
901
views
How to identify the same mouse when connected with USB receiver and USB cable in RawInput?
I am writing a WPF app in which I use RawInput.Sharp to invoke the RawInput API and I'm able to obtain the mouse list and listen to the mouse event I'm interested in. No problem for that part.
However,...
-1
votes
1
answer
1k
views
Tensorflow TextVectorization: convert the predicted text back to a human readable string
I have developed a model that generates a new world that follows a sequence. The model successfully outputs a prediction, but I'm unable to use it as it is vectorized.
I use tensorflow.keras.layers....
0
votes
1
answer
769
views
How to detect main keyboard connection and disconnection on Windows
I'm working on an application that uses Window's window and raw input APIs.
I can get input without too much difficulty and right now I'm trying to detect when devices are connected or disconnected ...
0
votes
1
answer
222
views
GetRawInputData sniffing character problem on different language setting
I'm using GetRawInputData for sniffing barcode reader data.
https://github.com/mfakane/rawinput-sharp
When I read a barcode from my barcode scanner normally it gets the right characters both rawinput ...
0
votes
0
answers
1k
views
How to use ffmpeg command without any codec?
I am using the following command to create an mp4 container, input in a raw file, and the problem I have is FFmpeg apparently trying to encode me in H264. Is there a way to tell FFmpeg not to use any ...
0
votes
0
answers
87
views
how to make sure that function only fires once (RawInputEventArg)
I'm currently working on a method that gives the user the possibility to add a handscanner to a dicitionary in order to scan some barcodes with it. (before i started the scanners were hardcoded in the ...
0
votes
1
answer
3k
views
Raw Input - recive WM_INPUT while window/program is in background
I am trying to monitor and printout the RAWINPUT from a mouse sent to the foreground window, or just all RAWINPUT from the mouse in general.
the global hook LowLevelMouseProc does not work for me ...
0
votes
0
answers
265
views
Can Raw Input Registration be done from one application for another application?
I've tried two things, one is as mentioned in the title.
Case 1: In one C++ console application (App_A) I register for RawInput but the window handle is that of another application (App_B) that has ...
2
votes
2
answers
807
views
(Windows HID API) HidD_GetPreparsedData() failing in WM_INPUT message handler due to incorrect handle?
I am trying to write custom handling for an Apple Magic Trackpad 2 (ultimately any Windows Precision Touchpad) into a Windows Desktop application. I am using this project as a guide, as it ...
0
votes
0
answers
335
views
WM_INPUT_DEVICE_CHANGE messages get lost when reading RAWINPUT via GetRawInputBuffer
I trying to write program that is working properly with GetRawInputBuffer API and consuming all input with little overhead on separate thread.
But I found that WM_INPUT_DEVICE_CHANGE messages get lost ...
0
votes
1
answer
2k
views
Unreal Engine 4.26.1 - Connect multiple / more than one Generic USB Controllers
I’m having a hard time trying to connect a steering wheel and pedals to the Unreal Engine (4.26.1). The steering wheel and the pedals are separated products, so each of them has its own USB connection....
0
votes
1
answer
176
views
EOFError in Shortcut Script: (raw) Keyboad-Input in Python
My first Python script should be a Keyboard-Shortcut-Quiz:
As a lot of Keyboard Shortcuts only work in combination with CTRL, SHIFT or WIN/OS Key the most "answers" of the quiz will contain ...
1
vote
2
answers
1k
views
GetRawInputDeviceInfo indicates a buffer size of 1 character for RIDI_DEVICENAME
I'm getting ridiculous behavior from RIDI_DEVICENAME. According to the documentation,
Return value
Type: UINT
If successful, this function returns a non-negative number indicating the number of ...
-1
votes
1
answer
1k
views
(python 3) When using raw_input(), why does the function add "\n" to the input?
I searched the first page of Google but couldn't find an answer. This won't happen for int(raw_input()) weirdly enough. But if i type:
a = [raw_input() for i in range(int(raw_input()))]
print(a)
...
0
votes
1
answer
164
views
RAWINPUT.Keyboard: How to detect arrow keys when NUMLOCK=ON?
When NUMLOCK=ON then
Key ARROW_UP pressed:
data.keyboard.MakeCode = 42;
data.keyboard.VKey = 255;
data.keyboard.Flags = 2;
data.keyboard.Message = 256 (WM_KEYDOWN)
Key ARROW_DOWN pressed:
data....
-3
votes
1
answer
408
views
Regarding raw_input.split() function in python
How does this line exactly works in python raw_input().split() ?
0
votes
2
answers
192
views
why does it skips the first line for input of an array
Input Format
The first line contains the space separated values of N
and M.
The next lines contain the space-separated elements of columns.
input
2 2
1 2
3 4
the code
import numpy
my_array = numpy....
0
votes
1
answer
323
views
Every time I run the code an error keeps coming saying,"TypeError: raw_input() takes from 1 to 2 positional arguments but 4 were given"
bird_names="kiwi, hawk, crow, penguin"
count=0
bird_guess=input("Guess the name of the bird that may be in the secret list.You will only get 3
chances")
while count<3:
if bird_guess....
0
votes
1
answer
131
views
I just created a Python script. I am trying to run it on my windows computer. It does not work
I created a python script named "script.py":
variable=raw_input("what is your name: ")
print "welcome",variable
Now I am trying to run it on my computer so that it ...
1
vote
1
answer
2k
views
how do I register an invisible window class in a Win32 console application?
I am trying to register an invisible window in a Win32 console application. My goal is to listen for Raw Input in the WindowProc to (1) display it on the console, and (2) perform additional ...
0
votes
1
answer
827
views
Get keyboard device ID for key event on UWP window when using multiple keyboards
Currently I have a Win32 desktop program written in C++ that uses the Raw HID Input API (a message loop observing WM_INPUT messages) to read key events and also get a handle to the specific keyboard ...
3
votes
1
answer
2k
views
RawInput WinAPI: GetRawInputBuffer() and message handling
Why
I'm trying to get input from a barcode scanner to my (visual) application. I would like to ignore input from other devices and get the input even if the application loses focus. I found the ...
2
votes
0
answers
225
views
How can i GetRawInputDeviceInfo from Global Hook (WH_GETMESSAGE)
I'm not sure i can do this.I am not familiar with window programming.I want to distinguish which device is coming from in these mouse or touch messages.The following code is in a DLL,which is a DLL ...
2
votes
0
answers
457
views
Identify specific HID device using windows rawinput API
I want to control the rumble motors on an xbox 360 controller and to do so I need to open a file on the device. How do I determine which device to open, that is, which is the controller/gamepad?
I'm ...
1
vote
0
answers
389
views
How to capture Ctrl+D when you have already typed soemthing in raw_input but have not pressed enter yet?
I want to support multiple line input for raw_input, ctrl+d in the following code works only when I am on an empty (new) line,
Current behaviour:
when user types xyz, then press enter again to get ...
6
votes
1
answer
601
views
GetKeyNameText numpad missing text
I'm trying to get the name of a pressed key with GetKeyNameText, using the make/scan code and extended-key flag given by raw input:
std::wstring GetKeyName(const RAWKEYBOARD& info)
{
WCHAR n[...
0
votes
1
answer
323
views
Store data in an array from a loop
I have two set of datas which I would like to multiply one by each other, and store the result in an array for each value.
For now I have this:
import csv
from mpdaf.obj import Spectrum, WaveCoord
...
0
votes
2
answers
2k
views
How to simulate physical keyboard input
I'm working with an C# Winforms project that read from multiple specified barcode scanner (app need to seperate data from scanner to have correct action)
I'm used raw input to filter by device ID and ...
0
votes
0
answers
98
views
using backspace adds some utf characters in raw_input
When using backspace it adds extra character in raw_input
I am using python 2.7 on Mobaxterm. I am using raw_input for the user input. For example if user wants to give an input such as "Python ...
0
votes
0
answers
494
views
RawInput : not handle Keyboard Event on condition
I try to use this project :
https://www.codeproject.com/Articles/17123/Using-Raw-Input-from-C-to-handle-multiple-keyboard
I want to handle keys just for a specific keyboard.
It is working but, I ...
3
votes
1
answer
1k
views
RAWINPUTHEADER hDevice null on WM_INPUT for laptop trackpad
I'm using raw input to handle input for generic devices, thus far all of my test cases have worked (keyboards, game pads and mice), but my laptops track pad is giving me a weird problem. When I get a ...
0
votes
1
answer
58
views
Python function keeps reiterating raw input question in command line
I'm trying to write a Fibonacci sequence that can take a user's input as the multiplier for the generational increase in rabbits, i.e., 4 pairs of offspring produced for each pair of mature rabbits.
...
2
votes
1
answer
216
views
Raw Input keyboard with RIDEV_NOHOTKEYS causes weird behavior
When I register a Raw Input keyboard device and set the RIDEV_NOHOTKEYS flag, like this:
RAWINPUTDEVICE device = {};
device.usUsagePage = 0x01;
device.usUsage = 0x06;
device.dwFlags = RIDEV_NOHOTKEYS;
...
0
votes
1
answer
239
views
How can I make a time-sensitive prompt in python? (Interrupting raw_input)
I am having trouble making a prompt that waits only for a certain amount of time for user input.
I've ended up using threading to start a thread that waits for the input and using the main thread to ...
0
votes
1
answer
420
views
Initializing HRAWINPUT on the same line as declaring it causes RegisterRawInputDevices to fail?
I'm trying to learn to handle input because I'm working on a bare bones 3d graphics engine, and when trying to learn raw input I came across this anomaly: Creating and initializing a HRAWINPUT struct ...
-1
votes
1
answer
234
views
Issues with input() and raw_input() for Python 2.7. User entered data is not read properly. What is going on?
So at my company they are making me use python 2.7 because of the product for a compatibility reason that I won't get into here.
So I am writing a program that connects to a device using SSH (a ...
0
votes
1
answer
896
views
Raw Input for mouse tracking always returns 0 for delta values
Registered Raw Input Device doesn't give mouse delta, WM_INPUT does get triggered and it does pass the if(raw->header.dwType == RIM_TYPEMOUSE) statement, but values given are always 0
void ...