bsiever / microbit-pxt-blehid

Micro:bit MakeCode support to act as a Human Interface Devices (keyboard, mouse, etc.) over Bluetooth
https://bsiever.github.io/microbit-pxt-blehid/
MIT License
31 stars 11 forks source link

Typing isssue #30

Closed JustablockCode closed 6 months ago

JustablockCode commented 6 months ago

When i use send keys block, sometimes(very often) it types wrong key or just skips key

bsiever commented 6 months ago

@JustablockCode Can you share an example program that has this behavior? You can use the share feature to create a copy to share: https://makecode.microbit.org/share .

JustablockCode commented 6 months ago

@JustablockCode Can you share an example program that has this behavior? You can use the share feature to create a copy to share: https://makecode.microbit.org/share .

image https://makecode.microbit.org/S54147-92229-30642-68729

bsiever commented 6 months ago

@JustablockCode It's possible that the device you're sending keys to can't receive keys at the rate they are being sent.

  1. Can you try this version: https://makecode.microbit.org/S46764-35960-67720-38342 and let me know if it's better?
  2. Can you let me know any details about the device you're sending keys to? (Computer or phone or tablet; model; operating system version)
JustablockCode commented 6 months ago

@JustablockCode It's possible that the device you're sending keys to can't receive keys at the rate they are being sent.

  1. Can you try this version: https://makecode.microbit.org/S46764-35960-67720-38342 and let me know if it's better?
  2. Can you let me know any details about the device you're sending keys to? (Computer or phone or tablet; model; operating system version)

Processor: AMD Ryzen 5 5600H with Radeon Graphics 3.30 GHz Ram: 8,00 GB Type: Laptop OS: WIndows 11 Home systemtype: x64

JustablockCode commented 6 months ago

@JustablockCode It's possible that the device you're sending keys to can't receive keys at the rate they are being sent.

  1. Can you try this version: https://makecode.microbit.org/S46764-35960-67720-38342 and let me know if it's better?
  2. Can you let me know any details about the device you're sending keys to? (Computer or phone or tablet; model; operating system version)

and your slow typing project works perfectly fine

bsiever commented 6 months ago

@JustablockCode

Thanks for reporting the error! I've looked into it and believe I have fixed it. I've released an updated version of the extension (v0.1.0).

Updates are not used in existing projects by default. Instructions to update an existing project can be found here: https://kittenbothk-eng.readthedocs.io/en/latest/Makecode/makecode_extensionUpdate.html . New projects should use the updated version automatically.

I've also added a new block in keyboard's ... more drawer that provides for better control over the key rate (rate of all events, actually). If the updated default value still is too fast, you can try to reduce the rate further: ChangeRate

I'm going to "close" this issue, but please re-open it if you notice problems.

JustablockCode commented 6 months ago

thx and also what is difference between absolute mouse and mouse

bsiever commented 6 months ago

@JustablockCode Most mice send updates relative to where the mouse is currently located, like "move 5 to the right of where you are". Absolute Mouse is more like a track pad and uses absolute coordinates, like go to 0,0.

Mouse is usually better if you're trying to create a device that behaves like a traditional mouse and moves a cursor around the screen. Absolute Mouse may be better if you're trying to automate something that interacts with the screen, like selecting something from a menu that's known to be at a certain location (Windows menu or the top menu bar on a Mac).