This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2012-03-08 12:55:52

BoltBait
Scratcher
Registered: 2009-03-09
Posts: 1000+

More keys available in Keypressed block - VOTE HERE

Here is my original suggestion: http://suggest.scratch.mit.edu/forums/6 … ssed-block

We need more keys available in the keypressed block. For example:

All the punctuation characters .,;:[]{}
Return key
Delete key
Backspace key
PageUp/PageDown
Home/End
Tab/Back Tab

The admin Lightnin responded

We’re open to adding some more keys, but not a ton. Here are the constraints:

-We need to keep the key menu from being too long
-Some keys are not universally available across keyboards — and we want everyone to be able run projects
-Using a lot of keys could make it harder to support tablets in the future
-Could be confusion around some keys such as return (which used to mean “green flag”)

If someone could make a list in the forums, and prioritize keys based on consensus, that would be awesome. We’ll refer to it when deciding which ones to add. Thanks for suggesting!

So, I'm creating this thread so we can vote for our favorite keys to add to the list.

What I need you to do is list your top 10 keys to add to the Keypressed block (and the When [space] key pressed hat) in vote order--your favorite being #1 and least favorite being #10.

To get the ball rolling, here is my vote:

1. Return (or Enter) - no longer tied to green flag
2. Left Shift and Right Shift - as separate keys
3. Backspace
4. Period and Comma: .,
5. Question Mark: ?
6. Math symbols: +-*/=
7. Double and single quotes: " and '
8. Brackets and Parenthisis: [, ], (, and ) - { and } would be nice
9. PageUp and PageDown
10. Home and End

Others to consider:
!@#$%^&;:\|<>
F1-F10
Insert Delete
Tab Back-Tab
Ctrl
Alt

Additionally, I would really like the keys on the number pad to respond to the Keypressed block and When [space] key pressed hat.

Last edited by BoltBait (2012-03-08 13:18:04)


Animated sigs must be banned!
http://boltbait.com/j.pnghttp://boltbait.com/s.pnghttp://boltbait.com/d.pnghttp://boltbait.com/a.pnghttp://boltbait.com/p.png

Offline

 

#2 2012-03-08 13:05:43

schusteralex2
Scratcher
Registered: 2011-09-17
Posts: 1000+

Re: More keys available in Keypressed block - VOTE HERE

All I think we need would be shift, tab, and enter  smile


http://i44.tinypic.com/2uj37ds.gif

Offline

 

#3 2012-03-08 13:09:41

scimonster
Community Moderator
Registered: 2010-06-13
Posts: 1000+

Re: More keys available in Keypressed block - VOTE HERE

Tab, shift, ctrl/cmd, alt, enter, backspace, ,./;'[]\-=`
Also, when ~!@#$%^&*()_+{}|:"<>? are pressed, it should respond to both `1234567890-=[]\;',./ and shift.

Last edited by scimonster (2012-03-08 13:36:19)

Offline

 

#4 2012-03-08 14:04:28

turkey3
Scratcher
Registered: 2011-12-04
Posts: 500+

Re: More keys available in Keypressed block - VOTE HERE

Support

Offline

 

#5 2012-03-08 14:48:50

BoltBait
Scratcher
Registered: 2009-03-09
Posts: 1000+

Re: More keys available in Keypressed block - VOTE HERE

turkey3 wrote:

Support

No need to "support" this suggestion.  It is already being considered by the Scratch Team for the 2.0 release.

What you need to do now it tell us which keys you want added to the list... preferrably in priority order for you.


Animated sigs must be banned!
http://boltbait.com/j.pnghttp://boltbait.com/s.pnghttp://boltbait.com/d.pnghttp://boltbait.com/a.pnghttp://boltbait.com/p.png

Offline

 

#6 2012-03-08 19:34:17

Mokat
Scratcher
Registered: 2011-12-08
Posts: 1000+

Re: More keys available in Keypressed block - VOTE HERE

Return/enter
Shift
/.,';[]*-+ and Alt.


http://www.eggcave.com/egg/977371.pnghttp://www.eggcave.com/egg/977376.pnghttp://www.eggcave.com/egg/1005291.pnghttp://www.eggcave.com/egg/996745.png

Offline

 

#7 2012-03-08 22:51:07

ProgramCAT
Scratcher
Registered: 2011-12-13
Posts: 500+

Re: More keys available in Keypressed block - VOTE HERE

Backspace
Ctrl


Programming is an art...
Goodbye, Scratch. I am leaving because of the exams coming up at our school, though I'll check the forums once or twice a week.

Offline

 

#8 2012-03-08 23:04:33

MaxFlyboy
Scratcher
Registered: 2011-11-07
Posts: 100+

Re: More keys available in Keypressed block - VOTE HERE

A selection saying

<[any v] key pressed>
It would really help for slideshows, or anything like that.


http://cdn.voodoofilm.org/images/upload/thumb/viral-video-2011.jpg click the picture for an AMV

Offline

 

#9 2012-03-09 04:43:11

scimonster
Community Moderator
Registered: 2010-06-13
Posts: 1000+

Re: More keys available in Keypressed block - VOTE HERE

MaxFlyboy wrote:

A selection saying

<key [any v] pressed?>
It would really help for slideshows, or anything like that.

Yes, we need to be able to sense if anything is being pressed.  smile
I fixed the block BTW.

Last edited by scimonster (2012-03-09 04:43:46)

Offline

 

#10 2012-03-09 04:49:04

trinary
Scratcher
Registered: 2012-01-29
Posts: 1000+

Re: More keys available in Keypressed block - VOTE HERE

Ctrl
Enter/Return
Backspace


http://trinary.tk/images/signature_.php

Offline

 

#11 2012-04-10 14:35:55

schusteralex2
Scratcher
Registered: 2011-09-17
Posts: 1000+

Re: More keys available in Keypressed block - VOTE HERE

Bumpo.


http://i44.tinypic.com/2uj37ds.gif

Offline

 

#12 2012-04-10 14:47:07

Ecliptic
Scratcher
Registered: 2012-02-27
Posts: 500+

Re: More keys available in Keypressed block - VOTE HERE

That'd be very helpful.


If you can read this you are in range.

Offline

 

#13 2012-04-10 14:47:18

TorbyFork234
Scratcher
Registered: 2012-03-01
Posts: 1000+

Re: More keys available in Keypressed block - VOTE HERE

scimonster wrote:

MaxFlyboy wrote:

A selection saying

<key [any v] pressed?>
It would really help for slideshows, or anything like that.

Yes, we need to be able to sense if anything is being pressed.  smile
I fixed the block BTW.

I support the <key [any v] pressed?>.

Last edited by TorbyFork234 (2012-06-07 12:50:44)

Offline

 

#14 2012-05-29 00:04:23

amcerbu
Scratcher
Registered: 2009-07-21
Posts: 500+

Re: More keys available in Keypressed block - VOTE HERE

Sorry to reawaken an old topic.  I just wanted to put in my two cents. 

Reading through this forum, I came across a problem: how would you deal with the fact that Apple computers have Cmd, while PC's have Ctrl (among numerous other keyboard differences on various other platforms)? 

I think the addition of the number keys, both shift keys, and maybe period and comma would be great.  But any key that has to be accessed by using shift will pose a problem.  For example, if I click Shift + 0 to get the left-facing parenthesis, does that register the shift key being pressed, the 0 key being pressed, the ) key being pressed, or all three?  Rather, I think the implementation of the "keypressed" command should be reworked in the following way (while still maintaining support for an older version of the block):

Rather than being a Boolean, the "keypressed?" reporter returns a list that contains all the keys being pressed at that moment (the same could be done for the "touching" Boolean).  Instead of checking whether a certain key is pressed, the program checks if a given key is a member of the list of keys that are pressed.

Offline

 

#15 2012-05-29 00:27:20

kayybee
Scratcher
Registered: 2009-12-07
Posts: 1000+

Re: More keys available in Keypressed block - VOTE HERE

Usually, in programs designed for windows, command acts as a control key. And the option as an alt.

However, pageup/down are not supported on many laptops, and neither are home/end...

Offline

 

#16 2012-05-29 00:38:53

jji7skyline
Scratcher
Registered: 2010-03-08
Posts: 1000+

Re: More keys available in Keypressed block - VOTE HERE

Some keys you mentioned don't appear on many minimised and laptop keyboards.


I don't know why you say goodbye, I say hello!  big_smile

Offline

 

#17 2012-05-29 01:12:35

ManaUser
Scratcher
Registered: 2009-03-11
Posts: 100+

Re: More keys available in Keypressed block - VOTE HERE

In my experiences except for separate left and right ctrl/alt/win keys, laptops almost always have the full complement, but some are combined. So for example to send the End keystroke, you might have to physically press Fn+Right Arrow, or something like that.


http://i.imgur.com/SPYSM.gif http://i.imgur.com/t9k1Z.gif http://i.imgur.com/OwYVa.gif http://i.imgur.com/0qlZq.gif

Offline

 

#18 2012-05-29 13:29:38

Pecola1
Scratcher
Registered: 2010-09-06
Posts: 1000+

Re: More keys available in Keypressed block - VOTE HERE

Rigth shift left shif right ctrl left ctrl right alt and left alt are all ones that are used a TON in game making, yet none are on the lit. Add em. (though i would say just ctrl alt and shift... you rlly don't need left and right separate.)


If you are reading this, please read to the end, because if you don't you won't know what's at the end. Don't just skip to the end though otherwise you won't be able to read the middle, which is most important. Now you must be wondering why you just read all that, the reason is you may have not noticed something, read it again and see if you notice it this time  smile

Offline

 

#19 2012-05-29 13:55:02

Mokat
Scratcher
Registered: 2011-12-08
Posts: 1000+

Re: More keys available in Keypressed block - VOTE HERE

scimonster wrote:

MaxFlyboy wrote:

A selection saying

<key [any v] pressed?>
It would really help for slideshows, or anything like that.

Yes, we need to be able to sense if anything is being pressed.  smile
I fixed the block BTW.

That would be great! Also

 
when key [any v] pressed

Last edited by Mokat (2012-05-29 13:55:31)


http://www.eggcave.com/egg/977371.pnghttp://www.eggcave.com/egg/977376.pnghttp://www.eggcave.com/egg/1005291.pnghttp://www.eggcave.com/egg/996745.png

Offline

 

#20 2012-05-29 16:26:43

bobbybee
Scratcher
Registered: 2009-10-18
Posts: 1000+

Re: More keys available in Keypressed block - VOTE HERE

How about these:

<key pressed?>
(key pressed)


I support the Free Software Foundation. Protect our digital rights!

Offline

 

#21 2012-05-30 00:21:34

kayybee
Scratcher
Registered: 2009-12-07
Posts: 1000+

Re: More keys available in Keypressed block - VOTE HERE

Perhaps scratch could have a popup where the user can emulate the special keys being pressed, such as home/end, pg up/down, or keys that not everyone may have...

Offline

 

#22 2012-05-30 00:22:04

amcerbu
Scratcher
Registered: 2009-07-21
Posts: 500+

Re: More keys available in Keypressed block - VOTE HERE

@kayybee- Interesting idea!  Sort of like an onscreen keyboard?

Offline

 

#23 2012-06-06 05:43:50

SamWang
New Scratcher
Registered: 2012-04-15
Posts: 22

Re: More keys available in Keypressed block - VOTE HERE

I agree.

Offline

 

#24 2012-06-06 08:20:59

XenoK
Scratcher
Registered: 2011-09-08
Posts: 1000+

Re: More keys available in Keypressed block - VOTE HERE

All the keys.  That could make text editor simulations more realistic..


Eternity Tasks has launched into Alpha One! http://tasks.eternityincurakai.com/EI%20projects.png

Offline

 

#25 2012-06-07 05:34:03

GLaD0S
Scratcher
Registered: 2010-06-09
Posts: 19

Re: More keys available in Keypressed block - VOTE HERE

While I do find the current keypress-detection capabilities of Scratch very limited, Lightnin has a point: On my QWERTZ keyboard, there is no dedicated key for most special characters and I have to use Shift or AltGr to access them. This could cause problems with detecting said keys across different layouts, as special characters are usually detected by their key code rather than their character string.
For example, in any video game that requires the user to press [~] to access the console (which is a key I do not have), I have to press [ö] to open it, which took me quite a while to figure out.

What I would suggest instead is adding a block that returns a string for what key was pressed last and support for dragging round blocks into the dropdown selector of the current boolean <key [] pressed?> block. Not only does this allow for actual word processors, but these two in combination would also let Scratch games offer customizable key bindings:

if <key (keyJump) pressed?>
  random jump code goes here
end

Offline

 

Board footer