Comments (3)
From the docs:
Sending a single character without the chars: command (e.g. just c) is equivalent to a SendInput command defined as (see below). In other words, sending a single character is the same as a single key press of a key on the keyboard. For example sending a will result in the A key being pressed. 1 will result in the 1 key being pressed. There is no difference between sending a and A. Use shiftdown:/shiftup: to simulate the pressing of the shift, control, alt, and windows keys.
IOW, if you just send a single char, MCE Controller tries to map that char to a VK_ code. Hence backtick gets translated into the VK code for 0x60
(VK_NUMPAD0
), not it's actually VK code (which is VK_OEM_3
).
See: https://docs.microsoft.com/en-us/windows/win32/inputdev/virtual-key-codes
If you want to send non-alpha chars, you can either:
- Embed them in a
chars:
command (e.g. "chars:`").
or
- Send
VK_OEM3
or
- Define and use a
SendInput
command with the VK code for the the tick key (VK_OEM3):<SendInput cmd="sendtick" vk="VK_OEM3" Enabled="True"/>
or<SendInput cmd="sendtick" vk="0xC0" Enabled="True"/>
Please let me know if you still are having trouble. Happy to tweak it to make it work for you.
from mcec.
Thank you so much for the explanation. Now that I've connected one missing dot, I believe I understand what's going on. Just for the benefit of anyone else looking at this in the future, the dot I was missing is that the ascii byte value for the backtick character is 0x60, which is what I was sending over the connection and that is why it then got mapped to the VK_NUMPAD0 code (which is value 0x60). I'm not particularly familiar with keyboard layout/region mapping stuff so I just incorrectly assumed the non-alphanumeric characters worked the same as the alphanumeric ones and that the key mappings were the same as well.
Now that I have a clearer picture of what is going on, I should be able to make things work with "chars:". One last thing I just discovered, that again may or may not be a bug, is that "chars:" followed by a single backslash character results in typing 0 characters. I suspect that is because the single backslash is being treated as an escape character? However, since "chars:" uses literal values, does having an escape character make sense? All the other non-alphanumeric characters I tried worked fine with "chars:" (including the ones that typically need an escape character) and "chars:" with two backslashes does type a single backslash. Just wanted to confirm this was intentional behavior.
That's kind of a long-winded way to say I think I've got everything I need and thank you again for your help with this!
from mcec.
chars:
supports escaped characters, and thus chars:\
is invalid. To send a \
you need to do chars:\\
. I should log when this happens and fix the docs.
Thanks.
from mcec.
Related Issues (20)
- Middle Mouse Button HOT 2
- Enabling Commands HOT 3
- Disable Auto Update Notification HOT 3
- Feature Request: Removing TCP/IP Server & Client Monitoring HOT 6
- Passing URL via RS-232 with MCEC HOT 1
- Overriding TimeOut on Shutdown Command doesn't seem to work HOT 1
- Windows 7 support HOT 1
- The .commands file is getting corrupted HOT 20
- Disable update notification HOT 1
- SendMessage command won't accept classname parameter HOT 2
- Verify latest InputSimulator
- SerialServer not working on Windows 10 and logs are flooded with exceptions HOT 1
- MCEC Client Host is failing on an IP address HOT 4
- SetForegroundWindow isn't working, but not errors are being generated HOT 4
- Option to disable automatic update check HOT 1
- Media commands Win10 HOT 5
- Run MCEControl.exe as Windows Service?
- How to use Home Assistant to send shutdown command to MCE
- Hi ! I love the MCEC controller, but is not a BUG, I just need to know if is possible to have some feedback to the client.....for example I send the command, but I don't know if is esecuted. In my application I'm increasing the volume level....the must could be to receve the feedback with the number of the volume level.... HOT 1
- feature suggestion: fast mouse movement HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mcec.