Discuss Scratch

JayoTophats
Scratcher
2 posts

I want to know how to make secret keyboard codes

I'm wanting to add something in a private project where if you type something (e.g. “ilikechocolate”) a secret will play, thank you
theforgottenwisp
Scratcher
100+ posts

I want to know how to make secret keyboard codes

Maybe this:
when green flag clicked
wait until <key [something v] pressed?> // Use as many of these as you need
wait until <key [something v] pressed?>
wait until <key [something v] pressed?>
wait until <key [something v] pressed?>
wait until <key [something v] pressed?>
... // This happens after the code is typed

Last edited by theforgottenwisp (Nov. 29, 2022 21:14:55)

JayoTophats
Scratcher
2 posts

I want to know how to make secret keyboard codes

Thank yooooouuu!
zxyxz
Scratcher
65 posts

I want to know how to make secret keyboard codes

sCrAtCh_139508
Scratcher
100+ posts

I want to know how to make secret keyboard codes

when green flag clicked
delete all of [codes v] :: list
delete all of [typed v] :: list
add [ilikechocolate] to codes
add [donuts1395] to codes
forever
set [code typed v] to []
wait until <key [any v] pressed ?>
sense type
if <[codes v] contains (code typed) ?> then
broadcast [typed code! v]
end
wait until <not <key [any v] pressed ?>>
end
define add (code) to codes
add (code) to [codes v]
add [] to [typed v]
define sense type
set [Avar v] to [0]
repeat (length of [typed v] :: list)
change [Avar v] by (1)
if <key (letter ((length of (item (Avar) of [typed v] :: list)) + (1)) of (item (Avar) of [codes v] :: list)) pressed ?> then
replace item (Avar) of [typed v] with (join (item (Avar) of [typed v] :: list) (letter ((length of (item (Avar) of [typed v] :: list)) + (1)) of (item (Avar) of [codes v] :: list)))
if <(item (Avar) of [typed v] :: list) = (item (Avar) of [codes v] :: list)> then
set [code typed v] to (item (Avar) of [typed v] :: list)
end
else
replace item (Avar) of [typed v] with []
end
end
_ninjatuna
Scratcher
58 posts

I want to know how to make secret keyboard codes

You can use the Makey Makey extension. (Works only with arrow keys)
Oumuamua
Scratcher
1000+ posts

I want to know how to make secret keyboard codes

<<<there is it, click the witch
supernavo
Scratcher
1000+ posts

I want to know how to make secret keyboard codes

Makey Makey has more options.
when [code goes here like a b c d etc] pressed in order::hat pen //hacked
when (join [code goes here like a b c d etc] []) pressed in order::pen hat //normal
when (code) pressed in order::hat pen // code goes in variable
when [up up down down left right left right v] pressed in order::hat pen //limited
Find it in extensions. That's the little blue square with blocks on it under the palette.

Last edited by supernavo (Dec. 2, 2022 13:31:25)

_ninjatuna
Scratcher
58 posts

I want to know how to make secret keyboard codes

supernavo wrote:

Makey Makey has more options.
when [code goes here like a b c d etc] pressed in order::hat pen //hacked
when (join [code goes here like a b c d etc] []) pressed in order::pen hat //normal
when (code) pressed in order::hat pen // code goes in variable
when [up up down down left right left right v] pressed in order::hat pen //limited
Find it in extensions. That's the little blue square with blocks on it under the palette.
Ohh..My bad, i didn't realize that, thanks
supernavo
Scratcher
1000+ posts

I want to know how to make secret keyboard codes

_ninjatuna wrote:

supernavo wrote:

Makey Makey has more options.
when [code goes here like a b c d etc] pressed in order::hat pen //hacked
when (join [code goes here like a b c d etc] []) pressed in order::pen hat //normal
when (code) pressed in order::hat pen // code goes in variable
when [up up down down left right left right v] pressed in order::hat pen //limited
Find it in extensions. That's the little blue square with blocks on it under the palette.
Ohh..My bad, i didn't realize that, thanks
Yw
Oumuamua
Scratcher
1000+ posts

I want to know how to make secret keyboard codes

Well, since this issue has been resolved satisfactorily, I'm going to post a picture with a solution without using extensions…


Have a nice day

Powered by DjangoBB