HID buttons, blocking modifyer

Got a good idea? You can suggest new features here.
Post Reply
cvben
Posts: 38
Joined: Wed Jun 07, 2017 8:30 pm

HID buttons, blocking modifyer

Post by cvben » Fri Aug 03, 2018 9:35 pm

EDIT: Moved from general support as I think it is more appropriate here.

Go ahead and put this on the backburner, the furthest one back, as it is a non-issue, but could be a QOL feature for the future.

Not sure how hard it would be to implement, but I was just wondering if there was a way to block detected HID keys which are used in macros, much like the way that keyboard key blocking works.

Not a huge deal if this is too much of a headache, because its like 2 keys for me that don't work they way I want.

Thanks

User avatar
kgschlosser
Site Admin
Posts: 4204
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: HID buttons, blocking modifyer

Post by kgschlosser » Sun Aug 05, 2018 2:47 am

I would need a better description of what you are trying to do.

when you say HID keys, do you mean keyboard keys?? if so i believe if you use the keyboard plugin which generates events for keyboard key presses. and you place the event for a specific key into an empty macro it will "block" the keystroke from populating to other programs.
If you like the work I have been doing then feel free to Image

cvben
Posts: 38
Joined: Wed Jun 07, 2017 8:30 pm

Re: HID buttons, blocking modifyer

Post by cvben » Sun Aug 05, 2018 3:23 pm

Yeah rereading that was unclear, I meant that this might be good for the Generic HID plugin.

I have a a couple devices: Mx3 airmouse https://www.amazon.com/Rii-Multifunctio ... B01CL3ZXGO
and the seriously amazing K700 https://www.amazon.com/Logitech-Wireles ... 004VD4F1W/

Don't let the price of the keyboard scare you btw, bought it on ebay for $15

These keyboards have inbuilt keys that sometimes call a function on the PC and/or sometimes do nothing. However in both cases the keys are detected under generic HID. So being able to block the PC from seeing inputs would solve the first case, where an action is called. For example a button in this one keyboard I used before would open internet explorer, no matter what my default browser was set to it would just open IE. The HID plugin saw the button and could set context or turn off or on macros, even going to the point of closing IE on detection then launching chrome. It was usable, but sometimes annoying.

User avatar
kgschlosser
Site Admin
Posts: 4204
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: HID buttons, blocking modifyer

Post by kgschlosser » Sun Aug 05, 2018 5:38 pm

the price tag does not scare me at all. i spent about 200 for mine. anything that has mechanical keys (clicks when pressed) is expensive. but they last a really long time. I was going through 3-4 keyboards a year and I also was going through 2-3 mice a year. i finally went out and spent 350 for a mouse and keyboard. been over a year now without a need to replace either of them. and the mouse lasts several days on a single charge.


this is a list of all of the keyboard codes that are available. you can test these with the Send Keys action. as you will notice there are a whole slew of OEM and "other" keyboard codes. to test them using the send keys action you would need to use the "KEY" on the left wrapped in curly braces {}

as an example to send an F10 you would type in {F10}

I do not think that the keyboard plugin is set up to generate events for all of these keys. but they can be easily added. if your one of these keycodes does the same as one of the keys you want to block then blocking it becomes a whole lot easier.

Now as far as the mouse goes. I do know that any mouse that has over the standard buttons (listed below) use other HID identifiers that are manufacturer specific. I have never looked into the ability to block HID data. I am not sure if I have the knowledge to be able to do something like that. I can research it a bit and see what I come up with.

HWheel
VWheel
Left
Middle
Right
Back
Forward


Code: Select all

KEY                          KEYCODE
=========================================

Uppercase Letter Keys
-----------------------------------------
A                        -    0x0041
B                        -    0x0042
C                        -    0x0043
D                        -    0x0044
E                        -    0x0045
F                        -    0x0046
G                        -    0x0047
H                        -    0x0048
I                        -    0x0049
J                        -    0x004A
K                        -    0x004B
L                        -    0x004C
M                        -    0x004D
N                        -    0x004E
O                        -    0x004F
P                        -    0x0050
Q                        -    0x0051
R                        -    0x0052
S                        -    0x0053
T                        -    0x0054
U                        -    0x0055
V                        -    0x0056
W                        -    0x0057
X                        -    0x0058
Y                        -    0x0059
Z                        -    0x005A


Function Keys
-----------------------------------------
F1                       -    0x0070
F2                       -    0x0071
F3                       -    0x0072
F4                       -    0x0073
F5                       -    0x0074
F6                       -    0x0075
F7                       -    0x0076
F8                       -    0x0077
F9                       -    0x0078
F10                      -    0x0079
F11                      -    0x007A
F12                      -    0x007B
F13                      -    0x007C
F14                      -    0x007D
F15                      -    0x007E
F16                      -    0x007F
F17                      -    0x0080
F18                      -    0x0081
F19                      -    0x0082
F20                      -    0x0083
F21                      -    0x0084
F22                      -    0x0085
F23                      -    0x0086
F24                      -    0x0087



Oem Keys
-----------------------------------------
Oem1                     -    0x00BA
Oem2                     -    0x00BF
Oem3                     -    0x00C0
Oem4                     -    0x00DB
Oem5                     -    0x00DC
Oem6                     -    0x00DD
Oem7                     -    0x00DE
Oem8                     -    0x00DF
Oem92                    -    0x0092
Oem93                    -    0x0093
Oem94                    -    0x0094
Oem95                    -    0x0095
Oem96                    -    0x0096
Oem102                   -    0x00E2
OemE1                    -    0x00E1
OemE3                    -    0x00E3
OemE4                    -    0x00E4
OemE6                    -    0x00E6
OemE9                    -    0x00E9
OemEA                    -    0x00EA
OemEB                    -    0x00EB
OemEC                    -    0x00EC
OemED                    -    0x00ED
OemEE                    -    0x00EE
OemEF                    -    0x00EF
OemF0                    -    0x00F0
OemF1                    -    0x00F1
OemF2                    -    0x00F2
OemF3                    -    0x00F3
OemF4                    -    0x00F4
OemF5                    -    0x00F5
OemClear                 -    0x00FE
OemComma                 -    0x00BC
OemMinus                 -    0x00BD
OemPeriod                -    0x00BE
OemPlus                  -    0x00BB


Number Keys
-----------------------------------------
0                        -    0x0030
1                        -    0x0031
2                        -    0x0032
3                        -    0x0033
4                        -    0x0034
5                        -    0x0035
6                        -    0x0036
7                        -    0x0037
8                        -    0x0038
9                        -    0x0039


Number Pad Number Keys
-----------------------------------------
Numpad0                  -    0x0060
Numpad1                  -    0x0061
Numpad2                  -    0x0062
Numpad3                  -    0x0063
Numpad4                  -    0x0064
Numpad5                  -    0x0065
Numpad6                  -    0x0066
Numpad7                  -    0x0067
Numpad8                  -    0x0068
Numpad9                  -    0x0069



Mouse Buttons
-----------------------------------------
LButton                  -    0x0001
MButton                  -    0x0004
RButton                  -    0x0002
XButton1                 -    0x0005
XButton2                 -    0x0006

Other Keys
-----------------------------------------
Accept                   -    0x001E
Add                      -    0x006B
Alt                      -    0x0012
AltGr                    -    0x000A
Apps                     -    0x005D
Attn                     -    0x00F6
BACK                     -    0x0008
Backspace                -    0x0008
BrowserBack              -    0x00A6
BrowserFavorites         -    0x00AB
BrowserForward           -    0x00A7
BrowserHome              -    0x00AC
BrowserRefresh           -    0x00A8
BrowserSearch            -    0x00AA
BrowserStop              -    0x00A9
CAPITAL                  -    0x0014
CONTROL                  -    0x0011
Cancel                   -    0x0003
CapsLock                 -    0x0014
Clear                    -    0x000C
Convert                  -    0x001C
CrSel                    -    0x00F7
Ctrl                     -    0x0011
DEL                      -    0x012E
Decimal                  -    0x006E
Delete                   -    0x002E
Divide                   -    0x006F
Down                     -    0x0028
ENTER                    -    0x000D
ESC                      -    0x001B
End                      -    0x0023
EraseEof                 -    0x00F9
Escape                   -    0x001B
ExSel                    -    0x00F8
Execute                  -    0x002B
Final                    -    0x0018
Hanja                    -    0x0019
Help                     -    0x002F
Home                     -    0x0024
INS                      -    0x012D
Insert                   -    0x002D
Junja                    -    0x0017
Kana                     -    0x0015
LAlt                     -    0x00A4
LCtrl                    -    0x00A2
LShift                   -    0x00A0
LWin                     -    0x005B
LaunchApp1               -    0x00B6
LaunchApp2               -    0x00B7
LaunchMail               -    0x00B4
LaunchMediaSelect        -    0x00B5
Left                     -    0x0025
MediaNextTrack           -    0x00B0
MediaPlayPause           -    0x00B3
MediaPrevTrack           -    0x00B1
MediaStop                -    0x00B2
ModeChange               -    0x001F
Multiply                 -    0x006A
NonConvert               -    0x001D
Noname                   -    0x00FC
NumLock                  -    0x0090
PA1                      -    0x00FD
PGDOWN                   -    0x0022
PGUP                     -    0x0021
Packet                   -    0x00E7
PageDown                 -    0x0022
PageUp                   -    0x0021
Pause                    -    0x0013
Play                     -    0x00FA
Print                    -    0x002A
PrintScreen              -    0x002C
ProcessKey               -    0x00E5
RAlt                     -    0x00A5
RCtrl                    -    0x00A3
RShift                   -    0x00A1
RWin                     -    0x005C
Return                   -    0x000D
Right                    -    0x0027
SPC                      -    0x0020
ScrollLock               -    0x0091
Select                   -    0x0029
Separator                -    0x006C
Shift                    -    0x0010
Sleep                    -    0x005F
Space                    -    0x0020
Subtract                 -    0x006D
TAB                      -    0x0009
Tabulator                -    0x0009
Up                       -    0x0026
VolumeDown               -    0x00AE
VolumeMute               -    0x00AD
VolumeUp                 -    0x00AF
WIN                      -    0x015B
Zoom                     -    0x00FB


?????
-----------------------------------------
U00                      -    0x0000
U07                      -    0x0007
U0B                      -    0x000B
U0E                      -    0x000E
U0F                      -    0x000F
U16                      -    0x0016
U1A                      -    0x001A
U3A                      -    0x003A
U3B                      -    0x003B
U3C                      -    0x003C
U3D                      -    0x003D
U3E                      -    0x003E
U3F                      -    0x003F
U40                      -    0x0040
U5E                      -    0x005E
U88                      -    0x0088
U89                      -    0x0089
U8A                      -    0x008A
U8B                      -    0x008B
U8C                      -    0x008C
U8D                      -    0x008D
U8E                      -    0x008E
U8F                      -    0x008F
U97                      -    0x0097
U98                      -    0x0098
U99                      -    0x0099
U9A                      -    0x009A
U9B                      -    0x009B
U9C                      -    0x009C
U9D                      -    0x009D
U9E                      -    0x009E
U9F                      -    0x009F
UB8                      -    0x00B8
UB9                      -    0x00B9
UC1                      -    0x00C1
UC2                      -    0x00C2
UC3                      -    0x00C3
UC4                      -    0x00C4
UC5                      -    0x00C5
UC6                      -    0x00C6
UC7                      -    0x00C7
UC8                      -    0x00C8
UC9                      -    0x00C9
UCA                      -    0x00CA
UCB                      -    0x00CB
UCC                      -    0x00CC
UCD                      -    0x00CD
UCE                      -    0x00CE
UCF                      -    0x00CF
UD0                      -    0x00D0
UD1                      -    0x00D1
UD2                      -    0x00D2
UD3                      -    0x00D3
UD4                      -    0x00D4
UD5                      -    0x00D5
UD6                      -    0x00D6
UD7                      -    0x00D7
UD8                      -    0x00D8
UD9                      -    0x00D9
UDA                      -    0x00DA
UE0                      -    0x00E0
UE8                      -    0x00E8
UFF                      -    0x00FF

If you like the work I have been doing then feel free to Image

cvben
Posts: 38
Joined: Wed Jun 07, 2017 8:30 pm

Re: HID buttons, blocking modifyer

Post by cvben » Tue Aug 07, 2018 2:25 am

I actually learned just yesterday that these keys are APPS key shortcuts such as "BrowserHome" and "Back", which on one of these keyboards launch the default browser to the homepage, and a back web command respectively. I guess the issue is that they are't "seen" by eventghost, or at least are not reported in the log.

User avatar
kgschlosser
Site Admin
Posts: 4204
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: HID buttons, blocking modifyer

Post by kgschlosser » Tue Aug 07, 2018 3:12 am

that my friend can be rectified
If you like the work I have been doing then feel free to Image

cvben
Posts: 38
Joined: Wed Jun 07, 2017 8:30 pm

Re: HID buttons, blocking modifyer

Post by cvben » Tue Aug 07, 2018 1:18 pm

Thanks man. Like I said no hurry, I even found a temporary solution with AHK

Code: Select all

VK_BROWSERHOME:: run /somepath/eventghost.exe -s -e someevent
:)

Post Reply