![]() |
KnowBrainer Speech Recognition | ![]() |
Topic Title: help wanted: script for accessibility with Minecraft Topic Summary: recent versions of Minecraft no longer work with Lindsay Adam's <keyname> hold down command Created On: 05/07/2021 04:48 PM Status: Post and Reply |
|
![]() |
![]() |
- Twisted_Code | - 05/07/2021 04:48 PM |
![]() |
![]() |
- monkey8 | - 05/09/2021 05:34 AM |
![]() |
![]() |
- Twisted_Code | - 05/09/2021 11:10 AM |
![]() |
![]() |
- monkey8 | - 05/10/2021 04:44 AM |
![]() |
![]() |
- Twisted_Code | - 05/11/2021 09:18 AM |
![]() |
![]() |
- monkey8 | - 05/11/2021 10:48 AM |
![]() |
![]() |
- Twisted_Code | - 05/13/2021 07:08 PM |
![]() |
![]() |
- Twisted_Code | - 05/29/2021 09:14 PM |
![]() |
![]() |
- Twisted_Code | - 06/06/2021 04:13 PM |
![]() |
![]() |
- monkey8 | - 06/07/2021 08:40 AM |
![]() |
![]() |
- monkey8 | - 06/08/2021 03:06 PM |
![]() |
![]() |
- Twisted_Code | - 06/12/2021 12:12 PM |
![]() |
![]() |
- ax | - 06/12/2021 08:44 PM |
![]() |
![]() |
- R. Wilke | - 06/14/2021 01:05 PM |
![]() |
![]() |
- ax | - 06/14/2021 02:42 PM |
![]() |
![]() |
- monkey8 | - 06/15/2021 08:06 AM |
![]() |
![]() |
- Twisted_Code | - 06/21/2021 10:20 AM |
![]() |
![]() |
- ax | - 06/21/2021 07:15 PM |
![]() |
|
been puzzling at this for a while but in all honesty I'm probably not the person to try to figure this one out. Does anyone know anything about the built-in command, attributed to Lindsay Adam, which (as written in it's built-in version) uses virtual key codes to hold down control, alt, Windows, and shift? I made some modifications so I could work around my spinal cord injury by also having it hold forward, space, and other keys I use for gaming, but I can't seem to get this to work with the latest version of Minecraft. If I had to guess, this might be because they updated the version of LWJGL they use around the time they released v1.13 (which appears to have change how input is handled), but that doesn't really give me any good ideas on where to go since I don't understand the script that well. Can anyone help? As is, my current script is here. Let me know if I need to provide any further detail. edit: looking at the script again, it looks like it wraps user32.dll as a function, but I don't know enough about working with DLLs to infer the appropriate modification, assuming that DLL can even still do what I want (I think I need it to work with scan codes instead). Can someone point me in the right direction for that? When I get back to this issue later I'll check to see if Windows has documentation about a DLL by this name, but again, I *really* don't know much about working with DLLs ------------------------- “Talk is cheap. Show me the code.” ~ Linus Torvalds
"It is good to have empathy. But it is not essential. What is essential is that one displays empathy, however one musters it." ~ ax (in a post on this very forums)
|
|
|
|
![]() |
|
Make sure you have changed the default hotkeys for force command recognition and force dictation. The default is to set them to holding down the shift key and holding down the control key. Try changing them to {Ctrl+Shift} and {Alt+Shift}. "Show Dragon Options" | Hot Keys will get you to where you want to be. ------------------------- |
|
|
|
![]() |
|
I'm not sure I understand what you're getting at. I looked at the options you directed me to, but my issue isn't with the commands being recognized as commands and dictation as dictation; the command in question still fires as intended, but Minecraft, which is what I'm trying to work with, is not receiving and acknowledging the controls. E.g. when I say "SPACE key hold down", my Minecraft character does not begin jumping. it used to work before Minecraft updated. Please take a look at the script I'm referring to, as I don't think you understood my issue. also see my first edit to the thread starter. I think I made at least a small bit of progress toward figuring it out, but I still need help. ------------------------- “Talk is cheap. Show me the code.” ~ Linus Torvalds
"It is good to have empathy. But it is not essential. What is essential is that one displays empathy, however one musters it." ~ ax (in a post on this very forums)
|
|
|
|
![]() |
|
I understood your question and the point of my posting was to tell you that if you had the default hotkey settings for forcing dictation and forcing command recognition set to {Ctrl} and {Shift} then the "CONTROL Key Hold Down" and the "SHIFT Key Hold Down" command that I scripted will not work. Therefore you would need to change them to something like I suggested above.
In terms of why the "SPACE Key Hold Down" no longer works I don't know and I can't investigate without downloading MineCraft which I am unable to do currently unfortunately.
The user32.dll is a Windows DLL that contains the definition for the keybd_event function that I used with the script and this will not be the reason why the script no longer works. Can you confirm that physically holding down the space key and then releasing at the appropriate time still works with MineCraft?
Lindsay ------------------------- |
|
|
|
![]() |
|
oh, I think I understand now. You're thinking Dragon intercepts the key event before it passes to Minecraft, right? But if that's the case, why do those commands work with other applications? I.e. I can use "SHIFT key hold down"/"CTRL key hold down" with pretty much anything except Minecraft, and it even worked on older versions of Minecraft. Either way, I'll clear those hotkeys if there's a way to do so without assigning them to something else. Can those hotkeys be unassigned completely? I don't foresee myself needing them...
understandable. Is it just because of the cost to buy the game or more than that? Might be able to find a cracked copy of the game, in the former case.
Lindsay
yes physically holding down keys still works, and in fact holding keys virtually using Windows' on-screen keyboard (/system32/osk.exe), which is how I usually control games, also works. It is only this command that seems to not work. ------------------------- “Talk is cheap. Show me the code.” ~ Linus Torvalds
"It is good to have empathy. But it is not essential. What is essential is that one displays empathy, however one musters it." ~ ax (in a post on this very forums)
|
|
|
|
![]() |
|
understandable. Is it just because of the cost to buy the game or more than that? Might be able to find a cracked copy of the game, in the former case.
I don't know about cracked copies but if I can get a download link what doesn't cost then I can take a look. You would also need to tell me in what context to use holding the space key down so I can test. ------------------------- |
|
|
|
![]() |
|
I'll see if I can find a (not-infected) link somewhere, though I do find it pretty ironic that piracy was my first thought when trying to FIX (or at least work around) a bug (or at least undefined behavior?) with the game. I suppose it's just a means to an end, right?
in the meantime, I may let this thread drop for a while because I have another more pressing issue with Dragon itself that I need to see if I can deal with. stay tuned, okay? Edit: Still planning to bump this, and now I'm thinking I might just lend an account for the game (not my account but a new one) if I can't find a trustworthy cracked copy. I'm less worried about losing $25 than I would be about accidentally downloading something malicious. Besides, lend Is the operative word. ------------------------- “Talk is cheap. Show me the code.” ~ Linus Torvalds
"It is good to have empathy. But it is not essential. What is essential is that one displays empathy, however one musters it." ~ ax (in a post on this very forums)
|
|
|
|
![]() |
|
it seems I've been rather stupid. No cracking should be necessary, as there's a free trial of the game (both the Java edition and bedrock). Just make sure to download the Java Edition, do whatever is necessary to set up the trial, log in and load the game. As for context: really any context will be an issue if I need to use Dragon to hold a key, but the most obvious way to test would be to do the following:
------------------------- “Talk is cheap. Show me the code.” ~ Linus Torvalds
"It is good to have empathy. But it is not essential. What is essential is that one displays empathy, however one musters it." ~ ax (in a post on this very forums)
|
|
|
|
![]() |
|
@Lindsay Hey it's been about a week since the last activity on this thread. Did you see my previous reply? as I described above, Minecraft has a trial version that should allow you to test the command. I also provided the step-by-step instructions on how to get a world running once you have it installed. If you don't have time to try it now, that's fine, I'd have one more hypothesis on how I might be able to fix the command, I just haven't tried it yet. ------------------------- “Talk is cheap. Show me the code.” ~ Linus Torvalds
"It is good to have empathy. But it is not essential. What is essential is that one displays empathy, however one musters it." ~ ax (in a post on this very forums)
|
|
|
|
![]() |
|
|
|
![]() |
|
So I tried this with minecraft to see what the issue is and there is a problem. Courtesy of Raymond Chen "Physical keyboards have a feature called "typematic" which autorepeats characters which are held down."
To emulate this with a script/software the script would need to emulate typematic as well.
I'm amazed that this ever worked with a character key or a space with my script because it shouldn't have, you can test this in any text editor. If it did it was something within Minecraft which has obviously changed.
So as it says in the link you can run a script/voice command to continually send the keystroke and then just interrupt the loop. See script below. Problem is you can't do this with advanced scripting/WinWrap basic because it is a single threaded scripting engine and when you call the script by voice (use the script below which will send 200 space keys to see what I mean) it will just lock up Dragon for 20 seconds until it finishes before you can issue another voice command. You would need to use multi-threading which you can't with advanced scripting/WinWrap basic.
Sub Main n = 0 Do While n < 200 Wait 0.1 SendKeys "{space}" n = n+1 Loop End Sub
However, a little-known fact, you can with DVC scripting because it is multithreaded as I have said many times on the forum so try the script with that (IMPORTANT: remember to change the wait time to 100 instead of 0.1 with DVC and of course remove the Sub Main and End Sub). What you will find now is that you can issue voice commands while the script is running.
So the last part is simple :-) you just need to work out what voice command to send to stop the script running (or change the DVC script) and I will leave that do the DVC scripters on the forum to give you the answer. Or even better try yourself and let me know how you get on.
You could also do it easily with the NatLink languages supported.
------------------------- |
|
|
|
![]() |
|
Oh boy, that conversation would go great... "it's for work!" isn't likely to be accepted To emulate this with a script/software the script would need to emulate typematic as well. [...] I'm amazed that this ever worked with a character key or a space with my script because it shouldn't have, you can test this in any text editor. If it did it was something within Minecraft which has obviously changed. I'm not so surprised. Aren't you just using a function of user32 to send a keyboard down event and a keyboard release event (depending on which command is used)? From what I've seen, text editors are actually the exception to the rule when it comes to needing repeated keyboard events, and I notice that a text editor was the main example of "no working" given n in the SO question. At least with other games I've played, they all act like your commands cause the key to be held down, whether that game is something like slime rancher, Minecraft (older versions, that is), Toontown Rewritten, or anything else I've played. I still think you might just be sending the wrong type of event for Minecraft to be able to detect it (and in any case I'd rather not occupy an entire thread with constant keyboard events if there is another option). For instance, there is a difference between virtual keys and scan codes, as I've seen on a few occasions writing scripts for AutoHotkey. The only reason I didn't immediately try writing an AutoHotkey script when I noticed this issue is that, in my experience, the most direct way of invoking AutoHotkey commands/scripts with no-brainer appears to be shellexecute, which has a few problems:
I noticed scripting has a .NET option. How does that work? I'm starting to learn C# as part of my college degree... would I be able to use C# with the .NET support or would I still be stuck with WWB's very janky syntax? edit: heavily edited this post to make it clear what I meant and what I was thinking. sorry if you happened to see it before the edit and started to reply... ------------------------- “Talk is cheap. Show me the code.” ~ Linus Torvalds
"It is good to have empathy. But it is not essential. What is essential is that one displays empathy, however one musters it." ~ ax (in a post on this very forums)
|
|
|
|
![]() |
|
2. depending on how long it takes Windows' command shell to process the shellexecute, there might be at least a brief blip where the command prompt window shows up, which is not ideal for gaming. Workable, but not pleasant.
1. Can't remember if PG or someone else had mentioned some switches that you can invoke so as not to have the command prompt window flash before your eyes. I am not really a desktop Dragon user at this point so this is less applicable to me. But I do activate ImageMagick through AHK regularly and mostly live with the flashing.
2. My kid's school asked her to download Minecraft last week for "educational purposes". Modules such as this are popular with teachers.
3. If your objective is singular, have you thought about using either VoiceAttack, or VoiceMacro? I tried the latter and it is showing a lot of promise, and I couldn't believe it is even freeware. Being free isn't a prerequisite but being portable is a nice-to-have. VoiceMacro is portable as it does not require Admin rights to install and run (but probably can do more if installed with Admin rights, as these sorts of things go). VoiceAttack costs less than a single meal at McDonald's these days. |
|
|
|
![]() |
|
I may be suffering from Alzheimers, but I seem to remember seeing a post submitted by monkey8 today talking about how Scotland will do against the Czech Republic in the football EM, and, depending on how they do, either continue contributing, or not. As expected, he decided on "not contributing", given the result once again as expected.
------------------------- The New Game in Town: DragonConnect |
|
|
|
![]() |
|
No dementia. Not hallucinating either. |
|
|
|
![]() |
|
Well flattered by the attention of my two colleagues I will repeat what I said, well paraphrase what I said "if Scotland beat the Czech Republic then I will write you a little executable to do the task for you". My hope being that offering to spend time doing this would invoke sods law and they might win but alas they lost as usual (something I have got used to over the years but I was hoping for my boys' sake, well you never know :-). So I will extend the offer and if they beat either England or Croatia I will do the executable. I guess I'm pretty safe.
Good game tonight however, Germany versus France. Personally I am looking forward to Germany versus Holland… (Well after Scotland versus England of course). Nice avatar ax! ------------------------- |
|
|
|
![]() |
|
2. depending on how long it takes Windows' command shell to process the shellexecute, there might be at least a brief blip where the command prompt window shows up, which is not ideal for gaming. Workable, but not pleasant. 1. Can't remember if PG or someone else had mentioned some switches that you can invoke so as not to have the command prompt window flash before your eyes. I am not really a desktop Dragon user at this point so this is less applicable to me. But I do activate ImageMagick through AHK regularly and mostly live with the flashing. 2. My kid's school asked her to download Minecraft last week for "educational purposes". Modules such as this are popular with teachers. 3. If your objective is singular, have you thought about using either VoiceAttack, or VoiceMacro? I tried the latter and it is showing a lot of promise, and I couldn't believe it is even freeware. Being free isn't a prerequisite but being portable is a nice-to-have. VoiceMacro is portable as it does not require Admin rights to install and run (but probably can do more if installed with Admin rights, as these sorts of things go). VoiceAttack costs less than a single meal at McDonald's these days. I'll give you suggestions and ideas a try sometime today, probably™. Who do you mean by PG, though? you wouldn't be referring to Paul Graham? that's the only person I can think of with those initials, though admittedly I haven't been around this forum very much, if you are referring to someone here. I assume based on the location of the their main office, your avatar, the discussion of feature updates that preceded, and the semiannual timeframe, "Serial Mass Predator outside of Seattle" refers to Microshit? If so, I'm totally reusing that descriptor for them. At least when I want to be less direct than just calling them "Microshit" like I always do. ------------------------- “Talk is cheap. Show me the code.” ~ Linus Torvalds
"It is good to have empathy. But it is not essential. What is essential is that one displays empathy, however one musters it." ~ ax (in a post on this very forums)
|
|
|
|
![]() |
|
Who do you mean by PG, though?
The PG_LTU from this thread:
https://www.knowbrainer.com/forums/forum/messageview.cfm?catid=4&threadid=30429
Not sure whether the switches s/he/they discussed were applicable to you.
Incidentally, I first came across the mention of VoiceMacro from this dude/dudette/dudem as well:
https://www.knowbrainer.com/forums/forum/messageview.cfm?catid=4&threadid=33411#171566
P.S., Softie isn't a fan of anything-goes "Southern Speak" apparently. So much so that the Company lays down the rules for "all our communications", lest we forget that the Company whose "technology reaches every part of the globe", is all about honouring autonomy and respecting choices.
I assume based on the location of the their main office, your avatar, the discussion of feature updates that preceded, and the semiannual timeframe, "Serial Mass Predator outside of Seattle" refers to Microshit?
I still recall one of the "teaching points" on empathy from a lecturer back in medical school, which admittedly were years ago: It is good to have empathy. But it is not essential. What is essential is that one displays empathy, however one musters it.
We are not asking Redmond to "respect" us. Just pretend to show a little respect - to those who use Windows to make a living.
Oh well ... Number 11 seems to be on the way ... to "get things right". "Die Hoffnung stirbt zuletzt" ... Agent Schmidt who's fond of saying that? |
|
|
FuseTalk Standard Edition v4.0 - © 1999-2023 FuseTalk™ Inc. All rights reserved.