P.I. Engineering User Forum

Product Support, Technical Questions and Answers, and Examples for P.I. Engineering Products

You are not logged in.

#1 2018-01-03 17:55:07

ConradD
Member
Registered: 2018-01-03
Posts: 1

Record key press for symbol without shift

Hello,

   I'm trying to map a key press of the less then symbol < in hardware mode, the problem I've got is I need it to be just the symbol itself, not the shift and , that the key recorder generates, is there a way to mimic a keypress of just the one charecter? Any suggestions are helpful.

Thanks

Offline

#2 2018-01-03 18:13:49

anonymousie
Member
Registered: 2018-01-03
Posts: 2

Re: Record key press for symbol without shift

This isn't possible. Characters aren't a "hardware mode" concept. In order to make the symbol, from hardware, it has to include both keys. "<" is not a keypress.

Offline

#3 2018-01-04 09:29:30

PIE Liam
Technical Support Specialist
From: Williamston, MI
Registered: 2016-01-21
Posts: 123
Website

Re: Record key press for symbol without shift

anonymousie is correct. A hardware mode programmed "<"  sign would have both components ,but it will output the "<" sign in text editors and the like.

Offline

#4 2018-01-08 10:50:36

Programmer
Member
Registered: 2017-12-28
Posts: 15

Re: Record key press for symbol without shift

OK, do you guys have an option in your software to specify multiple keys in HID report ? Normal report should include multiple keys and modifier. If not, fix that.

Offline

#5 2018-01-08 11:11:36

PIE Liam
Technical Support Specialist
From: Williamston, MI
Registered: 2016-01-21
Posts: 123
Website

Re: Record key press for symbol without shift

Yes, by default our software can send multiple keys including modifiers.

Offline

#6 2018-01-08 11:22:53

Programmer
Member
Registered: 2017-12-28
Posts: 15

Re: Record key press for symbol without shift

What is the syntax for raw HID report if so ? I didn't see it in menu, examples or documentation, though I could have missed something.

Offline

#7 2018-01-08 11:26:04

PIE Liam
Technical Support Specialist
From: Williamston, MI
Registered: 2016-01-21
Posts: 123
Website

Re: Record key press for symbol without shift

Offline

#8 2018-01-08 11:42:23

Programmer
Member
Registered: 2017-12-28
Posts: 15

Re: Record key press for symbol without shift

So, basically I need to use the supplied DLL together with SDK in C# to program device, instead of Macroworks ?

Offline

#9 2018-01-08 11:57:55

PIE Liam
Technical Support Specialist
From: Williamston, MI
Registered: 2016-01-21
Posts: 123
Website

Re: Record key press for symbol without shift

Using Macroworks 3.1 will allow you to program the device. The SDK is for software developers to write our units into their software, if this describes your use then "yes" that's what it's there for. More information on programming the unit (including the documentation regarding Scan Codes, HID Codes, Virtual Key Codes etc.) can be found via "Help>Help" and "Help>Advanced Help"

Offline

#10 2018-01-08 14:52:28

Programmer
Member
Registered: 2017-12-28
Posts: 15

Re: Record key press for symbol without shift

As for script, supposing I want to specify the whole HID report and write it to MCU memory, then what is the syntax ?
I've seen HW.SendScanCode(), but without parameters as shift, alt and so on. Just a small one line example would be really helpful.
I assume HW is for MCU.

Offline

#11 2018-01-08 22:56:23

Crunch
Member
From: Maine
Registered: 2017-10-11
Posts: 11

Re: Record key press for symbol without shift

Doesn't really sound like you know what you want buddy. If you want some raw examples then use their software development kit i'm sure there is a C# sample?

Offline

#12 2018-01-09 00:07:27

Programmer
Member
Registered: 2017-12-28
Posts: 15

Re: Record key press for symbol without shift

Basically I want to specify exact MCU HID report in script. Something like HW.HIDKeyboardReport (lshift + lctrl, scancode).

Offline

#13 2018-01-10 18:58:28

Crunch
Member
From: Maine
Registered: 2017-10-11
Posts: 11

Re: Record key press for symbol without shift

You should be able to get that in the sdk or maybe in the device finder tool in MW3.1,  you might have to convert from hex but the raw data is right there

Offline

#14 2018-01-10 20:54:30

Programmer
Member
Registered: 2017-12-28
Posts: 15

Re: Record key press for symbol without shift

I'm not sure I'm following your thoughts. The hardware has MCU, which performs some simple software commands, routines and blocks, I'm asking if there is such a command, and if there is no such command, I would like to see it implemented.

Offline

#15 2018-01-11 11:21:40

PIE Liam
Technical Support Specialist
From: Williamston, MI
Registered: 2016-01-21
Posts: 123
Website

Re: Record key press for symbol without shift

"I want to specify exact MCU HID report in script"

The HID codes are in the script file presently.Once programmed you can extract the script by selecting "File>Save a Copy" and then opening the .MW3 file in NOTEPAD you'll see the codes for each macro on each button.

" I'm asking if there is such a command, and if there is no such command, I would like to see it implemented."

What command? Are you looking for a feature that when activated spits out a report of only the HID codes? If so, I'll mention it to our developers as a requested function but as the codes are already retrievable via the script file I'm not sure they will see the benefit. What are your plans with such a feature?

Offline

#16 2018-01-11 16:12:27

Programmer
Member
Registered: 2017-12-28
Posts: 15

Re: Record key press for symbol without shift

To send multiple scancodes at a time, that is to simplify things - and, please, do mention the function to the developers, that is HW.HIDKeyboardReport(modifiers, scancode, scancode, scancode, scancode, scancode, scancode) with its variations with different number of scancodes sent, or simply specifying the default parameters to be "0". Some of the scancodes may go to the software identifying the particular input device without extra driver level; there are other things which can be done with that, and the idea is to specify the EXACT HID report, not the scancodes.

Offline

#17 2018-01-11 19:04:44

Crunch
Member
From: Maine
Registered: 2017-10-11
Posts: 11

Re: Record key press for symbol without shift

They do send multiples at the same time don't they? I got keys with hundreds of keystrokes programmed in the hardware resident mode and it sends them all at a press..

Offline

#18 2018-01-11 20:38:15

Programmer
Member
Registered: 2017-12-28
Posts: 15

Re: Record key press for symbol without shift

Up to 6 key events per report. That is for your case would be have to be divided by 2. And some small bonus with modifiers with each report.

Offline

#19 2018-02-12 18:08:04

Programmer
Member
Registered: 2017-12-28
Posts: 15

Re: Record key press for symbol without shift

Also, inserting extra HID reports seems to fix the problem with certain KVMs. That is, the keys are marked as not pressed if they were failed to unregister for some reason.
Please, make sure that direct HID reports are available in your software ASAP.

Offline

Board footer

Powered by FluxBB