Discuss Scratch

MtGufo
Scratcher
30 posts

Detect when shift key is pressed

I have seen a few forum posts about how to detect nonstandard keys but all have become outdated. With the makey makey extension being somewhat new I was hoping someone had might have figured out a new way to detect nonstandard keys like shift, enter, backspace, or escape.
D-ScratchNinja
Scratcher
1000+ posts

Detect when shift key is pressed

Interesting. The problem here is, you could accidentally trigger keyboard shortcuts if you go too deep into special key use.
MtGufo
Scratcher
30 posts

Detect when shift key is pressed

Thank you for your responce,

I fail to see how this is a problem. If it is simply a matter of convenience, it would seem like the programmers prerogative to avoid shortcuts like sticky keys similarly to how it is the programmers prerogative to avoid lag. If it is a matter of security, what is the worst a keyboard shortcut could do? sure alt + f4 as a control would not work but how would that be any different than listing alt + f4 as a control in the instructions.
Mesteryman
Scratcher
100+ posts

Detect when shift key is pressed

Honestly, I have no idea, but maybe try griffpatch's ASCII Key Detector here. I understand that the shift key does not work in this project, but since it allows you to use custom keys I thought that it could be useful to you.
-Snipet-
Scratcher
500+ posts

Detect when shift key is pressed

Ever since hacked blocks were removed, it hasn’t been possible.
lolhi101
Scratcher
4 posts

Detect when shift key is pressed

when green flag clicked
forever
if <> then
<key [a v] pressed?>
end
end
just a test
LegoManiac04
Scratcher
1000+ posts

Detect when shift key is pressed

lolhi101 wrote:

when green flag clicked
forever
if <> then
<key [a v] pressed?>
end
end
just a test
Please don't blockspam on random topics. If you would like to test out Scratchblocks, please do it here.

To the OP, I believe this works:
<key (join [Shift] []) pressed?>
DipLeChip
Scratcher
1000+ posts

Detect when shift key is pressed

LegoManiac04 wrote:

lolhi101 wrote:

when green flag clicked
forever
if <> then
<key [a v] pressed?>
end
end
just a test
Please don't blockspam on random topics. If you would like to test out Scratchblocks, please do it here.

To the OP, I believe this works:
<key (join [Shift] []) pressed?>
Nope it doesn't work.
ThatOneWeirdDude
Scratcher
1000+ posts

Detect when shift key is pressed

lolhi101 wrote:

-snip-
Please don't necropost, and especially don't blockspam and necropost.


Necroposting is when a user posts on a really old topic that has been resolved; inactive; or an old version of a topic, without adding to the discussion.


Block spam is when a user uses scratchblocks for no reason, usually not helping the topic. It just causes lag, and server space is a huge concern on scratch.

If you have a question, make a new topic please.

-Dood

Powered by DjangoBB