Discuss Scratch

windowsxsbaccount
Scratcher
22 posts

The No Keyboard Challenge

Scratch is a drag-and-drop programming language, and you really don't need to use the keyboard to program in it at all.
But do you really need a keyboard? Well, Scratching this way provides several limitations that you need to work around if you want to create an interesting project.
Before you view the rest of this post, I would highly recommend that you try this challenge yourself. The rules are simple: Just don't use the keyboard! Any tricks like “right-click copy right-click paste” or “drag text over” are also banned.

Limitation 1: Numbers
In Scratch, the keyboard is most frequently used to put a value into a block. However, there are some workarounds to get numbers and letters!

To get the number 1, you can use the “not” block, but don't put anything into it. This will output “true”, but if you put it into a slot that expects a number, it will act like the number 1. If you need the actual number 1 in a block that expects a string, just do something like “<not <>> + ()”, where nothing goes in the second input of the plus block. This will force the boolean “true” to be converted into the number 1, allowing the number 1 to be used in “say” blocks.

Once you have the number 1, you can use it along with the “+” and “-” blocks to obtain any integer you want, and the “/” to get any rational number you want. However, there are obviously more efficient ways to obtain most integers than simply adding a bunch of “not” blocks together. Here are the most efficient ways I found to get numbers 0-10. (There are also several other ways to get these numbers. If you find a way to get a number from 0-10 with fewer blocks, then let me know and I'll add it to the list.)

(() + ()) // 0, note that blank inputs count as 0 in most blocks that expect numbers
<not <>> // 1
(<not <>> + <not <>>) // 2
(round ([e ^ v] of <not <>>)) // 3
(length of <not <>>) // 4, the "not" block acts as the string "true" when a block expects a string
(length of [apple]) // 5
((length of [apple]) + <not <>>) // 6
(length of (join [apple ] (() + ()))) // 7
(length of (join <not <>> . <not <>> :: operators)) // 8, ignore the period in the "join" block, I can't figure out how to get rid of it
(length of (join <not <>> . <<> and <>> :: operators)) // 9, again ignore the period
([10 ^ v] of <not <>>) // 10

You can get the negative of any number simply by doing:
(() - (number))
Alright, so now that we've covered numbers, onto:

Limitation 2: Letters
The keyboard is an important tool for typing letters, and without it, it becomes more difficult to put letters into a text box. Never fear, though, because there are some strings that can be created without using letters at all! I will now list all of these strings and how to get to them.
<not <>> // true
<<> and <>> // false
(() / ()) // NaN
(<not <>> / ()) // Infinity
(join [apple ] [banana]) // apple banana
With these strings, you can obtain a fair portion of the letters of the alphabet, but you cannot obtain all of them. In order to obtain all of them, you need to use the “() of ()” Sensing block. There are several sets of letter sprites with every letter of the alphabet. The sprite names of these sprites contain every letter in uppercase, and the costume names contain every letter in uppercase. You can use the “letter () of ()” block to extract the letters from the sprite/costume names.
You can also obtain a period by using the “letter () of ()” block on a number with a decimal point and retrieving the period that way, and a dash by using the “letter () of ()” block on a negative number. However, I do not think it is possible to get any other non-alphanumeric symbols.

Limitation 3: Variables
If you try to program without the keyboard for any significant length of time, you will probably run into an issue: your variables are severely limited! You have the “my variable” variable that comes with every Scratch project initially, but then you cannot create any other variables, because any variable you create has a blank name, and you cannot create a variable with a blank name.

However, there is a workaround: using the built-in variables that all sprites have! However, these internal variables do have limits to what values they contain. This is a list of all easily-adjustable built-in sprite variables along with their limits for what they can contain (using interval notation):

(x position) // Limits depend on the width of the sprite, the limits for a completely blank sprite are [-240, 240]
(y position) // Limits depend on the height of the sprite, the limits for a completely blank sprite are [-180, 180]
(direction) // Limits: (-180, 180]
(size) // Limits depend on the initial size of the sprite, the limits for a completely blank sprite are [100, ∞)
(volume) // Limits: [0, 100]
(There are also a few extension variables, but I won't list those.)
To access these variables, use the “() of ()” Sensing block, which outputs the necessary variable.

As you can see, the “size” variable has the widest range of numbers it can be set to, allowing for arbitrarily large numbers. However, it cannot hold numbers less than 100 or strings, the latter of which is something that only “my variable” can do.

There are some more tricks that you can use, and more limitations I didn't cover here, but I'll leave all of that for you to discover on your own!
Example program: https://scratch.mit.edu/projects/383239612/
Studio for putting these projects in: https://scratch.mit.edu/studios/4105349/
(Note: This studio has some projects made in Scratch 2.0, where different things were possible without the keyboard. For instance, the “() of ()” Operators block had “9” as a default input, you could get the number 10 into any number input by putting a block into and out of it, and there was no “my variable” variable)

Last edited by windowsxsbaccount (April 6, 2020 19:21:37)

saofan123
Scratcher
47 posts

The No Keyboard Challenge

_nix
Scratcher
1000+ posts

The No Keyboard Challenge

It'd be possible to get more letters (and some capitals) if you're allowed to embed costumes and backdrops from the Scratch media library, which doesn't require using the keyboard!

══ trans autistic lesbian enbydoggirl // harbinger of the waking world, just like you // 16, she/they
sparrows one word to the paragraph // go forth: change the world

windowsxsbaccount
Scratcher
22 posts

The No Keyboard Challenge

I have made a studio for all these projects! Link is in the OP.
nathanprocks
Scratcher
1000+ posts

The No Keyboard Challenge

I win!


Want to write text in rainbow? How about uʍop-ǝpısdn? Or just sdrawkcab? Get the TextTools Chrome extension!
My browser / operating system: Macrosoft Winding XO, Internet Exploder 6.0, Angel Player ver.:1.2.5
;
_nix
Scratcher
1000+ posts

The No Keyboard Challenge

nathanprocks wrote:

I win!
Noo, you should have copied “d!” (at “keyboard!”), not “d” then “.”

══ trans autistic lesbian enbydoggirl // harbinger of the waking world, just like you // 16, she/they
sparrows one word to the paragraph // go forth: change the world

herohamp
Scratcher
1000+ posts

The No Keyboard Challenge

_nix wrote:

nathanprocks wrote:

I win!
Noo, you should have copied “d!” (at “keyboard!”), not “d” then “.”
I'm thinking just using a mouse with multiple buttons and have 1 button scroll through the letter in the alphabet forward and the other background
nathanprocks
Scratcher
1000+ posts

The No Keyboard Challenge

_nix wrote:

nathanprocks wrote:

I win!
Noo, you should have copied “d!” (at “keyboard!”), not “d” then “.”
I redone it several times and somehow missed that one.
It was 4:29 AM though… I think I done well considering that I was probably tired.

herohamp wrote:

I'm thinking just using a mouse with multiple buttons and have 1 button scroll through the letter in the alphabet forward and the other background
You could use a program like AutoHotKey to remap your scroll wheel and middle mouse button (or any other buttons your mouse may have).
I think that's kinda cheating though.


Want to write text in rainbow? How about uʍop-ǝpısdn? Or just sdrawkcab? Get the TextTools Chrome extension!
My browser / operating system: Macrosoft Winding XO, Internet Exploder 6.0, Angel Player ver.:1.2.5
;
CatIsFluffy
Scratcher
100+ posts

The No Keyboard Challenge

Using
([costume # v] of [Sprite1 v])
, you can get “um”
Even without that,
(letter (3) of <not <>>)
is “u”

Last edited by CatIsFluffy (June 15, 2017 04:55:29)

windowsxsbaccount
Scratcher
22 posts

The No Keyboard Challenge

CatIsFluffy wrote:

Using
([costume # v] of [Sprite1 v])
, you can get “um”
Even without that,
(letter (3) of <not <>>)
is “u”

I added those solutions for “u” and “m”!
titanscratch
Scratcher
100+ posts

The No Keyboard Challenge

How did you find all that?!?!?!?!?!

Scratch Wiki Contributor • Active Forum User • New goal: 500 posts • 310/500 posts (62%)My projectsMy studiosMy profile

(-_-) // This is the Bob the good kumquat. He and his army fight evil kumquats.
(-@-) // This is one of the evil kumquats that eat up your signature!!!
:cool::cool::cool::cool::cool::cool::cool::cool::cool::cool::cool::cool::cool::cool::cool::cool::cool::cool::cool::cool::cool::cool::cool::cool::cool::cool::cool::cool::cool::cool::cool::cool::cool::cool::cool::cool::cool::cool::cool::cool::cool::cool::cool::cool::cool::cool::cool::cool::cool::cool::cool::cool::cool::cool::cool::cool::cool::cool::cool::cool::cool::cool::cool::cool::cool::cool::cool::cool::cool::cool::cool::cool::cool::cool::cool::cool::cool::cool::cool::cool::cool::cool::cool::cool::cool::cool::cool::cool::cool::cool::cool::cool::cool::cool::cool::cool::cool::cool::cool::cool::cool::cool::cool::cool::cool::cool::cool::cool::cool::cool::cool::cool:
CatIsFluffy
Scratcher
100+ posts

The No Keyboard Challenge

Using the mouse.
Sheep_maker
Scratcher
1000+ posts

The No Keyboard Challenge

Or one can just use an on-screen keyboard (afaik iOS, Android, Windows 10, and ChromeOS have this). It also comes with emoji and letters with diacritics

- Sheep_maker This is a kumquat-free signature. :P
This, my signature, appears below all my posts. Discuss it on my profile, not the forums. Here's how to make your own.
.postsignature { overflow: auto; } .scratchblocks { overflow-x: auto; overflow-y: hidden; }
daffy1234
Scratcher
100+ posts

The No Keyboard Challenge

How do variables work under this system? Could you use hacked blocks like these?

set (join [] []) to []

change (join [] []) by (0)

((join [] []) :: variables)
tinee123
Scratcher
8 posts

The No Keyboard Challenge

none of these helped… i'm suffering the same problem right now…
Scratch---Cat
Scratcher
1000+ posts

The No Keyboard Challenge

If you really wanted g j or z,
please upload a costume from the costume library.

Download Scratch 2.0 | Check your messages | Check my messages
_____________________________________________________________________________________________________

If you want to subscribe to this forum topic, please click the
{} Follow Discussion :: ring sensing
button below this forum post! Thanks!

Scratch---Cat
Scratcher
1000+ posts

The No Keyboard Challenge

One of my friends said that he can't use the keyboard because the Browser setting does not allow him to use the keyboard on the editor.

Download Scratch 2.0 | Check your messages | Check my messages
_____________________________________________________________________________________________________

If you want to subscribe to this forum topic, please click the
{} Follow Discussion :: ring sensing
button below this forum post! Thanks!

ninjagolloyd
Scratcher
500+ posts

The No Keyboard Challenge

Scratch---Cat wrote:

One of my friends said that he can't use the keyboard because the Browser setting does not allow him to use the keyboard on the editor.
i think your friend's browser is set up wrong

it's way too late
Scratch---Cat
Scratcher
1000+ posts

The No Keyboard Challenge

You can grab variables from the backpack.

Download Scratch 2.0 | Check your messages | Check my messages
_____________________________________________________________________________________________________

If you want to subscribe to this forum topic, please click the
{} Follow Discussion :: ring sensing
button below this forum post! Thanks!

WackyKitKat
Scratcher
19 posts

The No Keyboard Challenge

windowsxsbaccount wrote:

No variables (although tempo and volume could be used as variables as long as there's no sound)


You'll have to lose quite a bit of features, but depending on what you're willing to lose you can use

(x position)
(y position)
(direction)
(costume #)
(size)
(backdrop #)
(volume)
(tempo)

Powered by DjangoBB

Standard | Mobile