Discuss Scratch

FlashSloth
Scratcher
17 posts

How to make a On screen Keyboard in scratch

I was making a game about hacking and thought about adding a on screen keyboard . I tried many different ways but none of them worked properly . please help ?



I want it to only contain numbers btw
CoolCrafter1231
Scratcher
100+ posts

How to make a On screen Keyboard in scratch

Project link?
jonathangopokemon
Scratcher
63 posts

How to make a On screen Keyboard in scratch

Maybe something like this?


switch costume to [ number]
if < touching [ part of screen with number] > then

end
[scratchblocks]

Hope this works!
jonathangopokemon
Scratcher
63 posts

How to make a On screen Keyboard in scratch

In the if then you would put
switch costume to [ number]
FlashSloth
Scratcher
17 posts

How to make a On screen Keyboard in scratch

jonathangopokemon wrote:

Maybe something like this?


switch costume to [ number]
if < touching [ part of screen with number] > then

end
[scratchblocks]

Hope this works![/quote]


Thanks a bunch !!!!
jonathangopokemon
Scratcher
63 posts

How to make a On screen Keyboard in scratch

I like helping people
FlashSloth
Scratcher
17 posts

How to make a On screen Keyboard in scratch

This really worked for me !!! I just wanted to have a bit more info on this . And what about backspace ? But still thank you very much . And perhaps make it a bit easier to understand
jonathangopokemon
Scratcher
63 posts

How to make a On screen Keyboard in scratch

It was no problem. I’m not a great scratcher because I don’t know how to put code together, but i know lines of code together.
FlashSloth
Scratcher
17 posts

How to make a On screen Keyboard in scratch

okie dokie . Thanks again !!
jonathangopokemon
Scratcher
63 posts

How to make a On screen Keyboard in scratch

Here’s an explanation:

You have a onscreen keyboard and when the mouse touches it, it puts a sprite (letter in your case) on the screen!
Vaibhs11
Scratcher
1000+ posts

How to make a On screen Keyboard in scratch

It's hard. Beleive me.
DarkeShade
Scratcher
100+ posts

How to make a On screen Keyboard in scratch

It seems like you are trying to make a keyboard on-screen that reacts to your keystrokes in real life. To do this I'd recommend creating a basic shape for the back and then create a costume in the same sprite for every unique key you want present. These keys could all be clones of the original that simply switched their costume and went to certain coordinates(this would make it so the whole keyboard and scripts are in one sprite!). As for reacting to your keystrokes, each clone could be applied a size or brightness effect and basic noise when the mouse is down or the key pressed. I hope this helps in some way!
FlashSloth
Scratcher
17 posts

How to make a On screen Keyboard in scratch

thanks ! that was very helpful !!
Cloud_Neek89
Scratcher
14 posts

How to make a On screen Keyboard in scratch

Oh so how should I do it?
TheAnomalousPseudo
Scratcher
1000+ posts

How to make a On screen Keyboard in scratch

Powered by DjangoBB