Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » Shift key detection script?
- ampara
- Scratcher
92 posts
Shift key detection script?
Not 100% sure if this is supposed to be in this forum, my apologies if not.
So, for a collaboration OS project, we are building a text engine for the OS. However, when typing, there is no uppercase/lowercase detection (because that's how keyboards work) and there is no shift key detection, which would how we would be able to get around this limitation.
What I'm asking, is, does anybody know of a way to detect the shift key pressed (and backspace and enter if possible too, but less necessary) that is working in 3.0? (that doesn't involve using ask blocks to get the input)
Thanks so much for reading through,
ampara
So, for a collaboration OS project, we are building a text engine for the OS. However, when typing, there is no uppercase/lowercase detection (because that's how keyboards work) and there is no shift key detection, which would how we would be able to get around this limitation.
What I'm asking, is, does anybody know of a way to detect the shift key pressed (and backspace and enter if possible too, but less necessary) that is working in 3.0? (that doesn't involve using ask blocks to get the input)
Thanks so much for reading through,
ampara
- MargeScribbles
- Scratcher
15 posts
Shift key detection script?
I considered using a sprite to connect with a shift switch on screen for my last project and the sprite activated by key code - perhaps space plus s
- ampara
- Scratcher
92 posts
Shift key detection script?
I considered using a sprite to connect with a shift switch on screen for my last project and the sprite activated by key code - perhaps space plus s
That's actually a really good idea. Still, though, wish there was a way to actually check shift key press.
Thank you so much!
- discussion_man
- New to Scratch
89 posts
Shift key detection script?
I remember there used to be a way to do this in Scratch 2.0 using hacked blocks, but sadly I don't think it works in 3.0.
If you wanna talk about anything for any reason, leave a comment on my profile!
I don't know what I'm doing
- googoo11
- Scratcher
4 posts
Shift key detection script?
Not 100% sure if this is supposed to be in this forum, my apologies if not.
So, for a collaboration OS project, we are building a text engine for the OS. However, when typing, there is no uppercase/lowercase detection (because that's how keyboards work) and there is no shift key detection, which would how we would be able to get around this limitation.
What I'm asking, is, does anybody know of a way to detect the shift key pressed (and backspace and enter if possible too, but less necessary) that is working in 3.0? (that doesn't involve using ask blocks to get the input)
Thanks so much for reading through,
ampara
I have it!
This way works in scratch 3.0, and only works for the enter key (may for a few others)
<key (join [enter] []) pressed?>
You can also do
<key (join [!] []) pressed?>
to make scratch recognise if you are pressing 1 and shift at the same time. Unfortunately, no normal shift
Make sure to type it with NO CAPITALS!
Last edited by googoo11 (April 18, 2021 13:43:45)
- Harakou
- Scratcher
1000+ posts
Shift key detection script?
Hi! Thank you for offering your help, but this thread is pretty old - I don't think it's relevant anymore. When you respond to a topic, please make sure it's recent and the original poster still needs an answer. Thanks!Not 100% sure if this is supposed to be in this forum, my apologies if not.
So, for a collaboration OS project, we are building a text engine for the OS. However, when typing, there is no uppercase/lowercase detection (because that's how keyboards work) and there is no shift key detection, which would how we would be able to get around this limitation.
What I'm asking, is, does anybody know of a way to detect the shift key pressed (and backspace and enter if possible too, but less necessary) that is working in 3.0? (that doesn't involve using ask blocks to get the input)
Thanks so much for reading through,
ampara
I have it!
This way works in scratch 3.0, and only works for the enter key (may for a few others)<key (join [enter] []) pressed?>
You can also do<key (join [!] []) pressed?>
to make scratch recognise if you are pressing 1 and shift at the same time. Unfortunately, no normal shift
Make sure to type it with NO CAPITALS!
- Discussion Forums
- » Help with Scripts
- » Shift key detection script?