Hi,
I know this is not in the 16 items list but I made a very simple project to enhance the keyboard support and I would like to get it considered for inclusion. It's based on the suggestions from Bert for my old project in GSoC.
It's now a single-key morph and it compares the keyStrings (I don't know if this is good or bad). I hope it works across platforms (even if you have to reconfigure the keys when you open the project). I only have windows here so I would appreciate if someone can tell me if this works on Linux and Mac.
Thanks, Richo
_______________________________________________ etoys-dev mailing list [hidden email] http://lists.squeakland.org/mailman/listinfo/etoys-dev KeyPress.001.pr (82K) Download Attachment |
Works great for me.
I only have Windows so I can't tell if it has platform issues. Maybe we can mix it with this so the script can be triggered with a #keyDown or #keyUp 'event' ? http://tracker.squeakland.org/browse/SQ-331 With this the script does not need to be ticking to execute. (On second thought I'm not sure if it's a good idea. But it can be good to discuss :-) ) Karl On Thu, Feb 16, 2012 at 9:05 PM, Ricardo Moran <[hidden email]> wrote: > Hi, > > I know this is not in the 16 items list but I made a very simple project to > enhance the keyboard support and I would like to get it considered for > inclusion. It's based on the suggestions from Bert for my old project in > GSoC. > It's now a single-key morph and it compares the keyStrings (I don't know if > this is good or bad). I hope it works across platforms (even if you have to > reconfigure the keys when you open the project). I only have windows here so > I would appreciate if someone can tell me if this works on Linux and Mac. > > Thanks, > Richo > > _______________________________________________ > etoys-dev mailing list > [hidden email] > http://lists.squeakland.org/mailman/listinfo/etoys-dev > etoys-dev mailing list [hidden email] http://lists.squeakland.org/mailman/listinfo/etoys-dev |
On Thu, Feb 16, 2012 at 9:40 PM, karl ramberg <[hidden email]> wrote:
> Works great for me. > > I only have Windows so I can't tell if it has platform issues. > > Maybe we can mix it with this so the script can be triggered with a > #keyDown or #keyUp 'event' ? > http://tracker.squeakland.org/browse/SQ-331 > > With this the script does not need to be ticking to execute. The KeyPressMorph could self have a #keyDown and #keyUp script trigger so it could send messages to other players. > > (On second thought I'm not sure if it's a good idea. But it can be > good to discuss :-) ) > > Karl > > > On Thu, Feb 16, 2012 at 9:05 PM, Ricardo Moran <[hidden email]> wrote: >> Hi, >> >> I know this is not in the 16 items list but I made a very simple project to >> enhance the keyboard support and I would like to get it considered for >> inclusion. It's based on the suggestions from Bert for my old project in >> GSoC. >> It's now a single-key morph and it compares the keyStrings (I don't know if >> this is good or bad). I hope it works across platforms (even if you have to >> reconfigure the keys when you open the project). I only have windows here so >> I would appreciate if someone can tell me if this works on Linux and Mac. >> >> Thanks, >> Richo >> >> _______________________________________________ >> etoys-dev mailing list >> [hidden email] >> http://lists.squeakland.org/mailman/listinfo/etoys-dev >> etoys-dev mailing list [hidden email] http://lists.squeakland.org/mailman/listinfo/etoys-dev |
In reply to this post by Karl Ramberg
Wow, I can actually hold down two keys at the same time and both are "executed"!!!
This has been a big problem for two player games. Nice work. Unfortunately it doen't work on my Mac, I tried with Etoys 4.1 and 4..1.2 alpha 5.
So I am personally coming to Argentina to complain!!! (Okay, I am actually heading to Buenos Aires next week on business and hopefully I will be able to get time away from work and we can connect.)
Keep up the great work.
Thanks,
Stephen
On Thu, Feb 16, 2012 at 3:40 PM, karl ramberg <[hidden email]> wrote: Works great for me. _______________________________________________ etoys-dev mailing list [hidden email] http://lists.squeakland.org/mailman/listinfo/etoys-dev |
In reply to this post by Ricardo Moran
On Friday 17 Feb 2012 1:35:38 AM Ricardo Moran wrote:
> It's now a single-key morph and it compares the keyStrings (I don't know if > this is good or bad). I hope it works across platforms (even if you have to > reconfigure the keys when you open the project). I only have windows here > so I would appreciate if someone can tell me if this works on Linux and > Mac. I tried it on Linux (Kubuntu 10.04). Single and double key presses work as expected. But third and further keys are ignored (i.e. up+left+right acts as up+left instead of up). KeyPressMorph gets my vote. It has awesome implications for interactive projects on handhelds and smartphone form factors. Thank you, Ricardo. A few observations: * apart from just isPressed state, could you also track timePressed? Authors can use longPress etc. for driving interaction. A key can also be used as an analog input (e.g. acceleration). Note that isPressed == (timePressed > 0). * If a user presses the button area accidentally, there is no way to escape out of it. How about clicking the button or the floating tip to cancel the operation? * The tip "Press a key" is confusing. Suggest changing it to "Press new key" or similar and perhaps use blink or color change to indicate modal status. * The stringmorph "Key:" is superfluous. It comes in the way of grouping keys into a panel. This could be dropped. * A new key is not initialized with a label. If a new key is initialized with 'a' label, 'currentKey != nil' becomes invariant. the check for nil in currentKey could be replaced with an assert or dropped. HTH .. Subbu _______________________________________________ etoys-dev mailing list [hidden email] http://lists.squeakland.org/mailman/listinfo/etoys-dev |
In reply to this post by Steve Thomas
Having this would be very nice. However, it's more complicated than that. It assumes the same keycode will be used for stroke events as for key up/down events. That is not how the VM delivers these events. It only works "by accident" on Windows, possibly on Linux, but certainly not on Mac. I guess the easiest way to work around this would be by making the printKeyStringOn: method take into account Mac key codes. This probably would still have problems with international keyboards but maybe for stuff like cursor keys it would be okay. - Bert - On 17.02.2012, at 05:07, Steve Thomas wrote: Wow, I can actually hold down two keys at the same time and both are "executed"!!! _______________________________________________ etoys-dev mailing list [hidden email] http://lists.squeakland.org/mailman/listinfo/etoys-dev |
Okay, so here is the project, changed so the keys also work on a Mac. I committed the changes to MacUnicodeInputInterpreter, but for now they are included in the project, too. - Bert - On 17.02.2012, at 16:08, Bert Freudenberg wrote:
_______________________________________________ etoys-dev mailing list [hidden email] http://lists.squeakland.org/mailman/listinfo/etoys-dev KeyPress.002.pr (85K) Download Attachment |
Hi, I've been having some problems with my internet connection for the last couple of days, but I'm really happy you solved the cross-platform problem. Thanks, Bert :)
Cheers, Richo
On Fri, Feb 17, 2012 at 2:34 PM, Bert Freudenberg <[hidden email]> wrote:
_______________________________________________ etoys-dev mailing list [hidden email] http://lists.squeakland.org/mailman/listinfo/etoys-dev |
In reply to this post by Karl Ramberg
On Thu, Feb 16, 2012 at 6:18 PM, karl ramberg <[hidden email]> wrote:
I think having both options (ticking and events) would be a good idea, I'll look into that. Maybe we can also have a halo button (like the button has) for #keyStroke scripts (I don't know, I'm thinking out loud).
Cheers, Richo
_______________________________________________ etoys-dev mailing list [hidden email] http://lists.squeakland.org/mailman/listinfo/etoys-dev |
In reply to this post by K K Subbu
2012/2/17 K. K. Subramaniam <[hidden email]>
Yes, that happens to me also (in windows). I think that is a limitation of the arrow keys, it works when using the WASD keys.
* If a user presses the button area accidentally, there is no way to escape * The tip "Press a key" is confusing. Suggest changing it to "Press new key" Yes, I agree with these last three ideas. * The stringmorph "Key:" is superfluous. It comes in the way of grouping keys I'm not sure about this one, though. I know it doesn't add any information but I think the "Key:" serves as a title and a grabbing area for the morph. If others agree with you, I'll drop it.
* A new key is not initialized with a label. If a new key is initialized with You're right, actually there is no point in having a "keyButton" instance variable. Thanks, I'll fix these things.
Richo
_______________________________________________ etoys-dev mailing list [hidden email] http://lists.squeakland.org/mailman/listinfo/etoys-dev |
On 20.02.2012, at 00:10, Ricardo Moran wrote:
> 2012/2/17 K. K. Subramaniam <[hidden email]> >> I tried it on Linux (Kubuntu 10.04). Single and double key presses work as >> expected. But third and further keys are ignored (i.e. up+left+right acts as >> up+left instead of up). >> > Yes, that happens to me also (in windows). I think that is a limitation of the arrow keys, it works when using the WASD keys. It's a limitation of cheap keyboard hardware. Here is a good explanation: http://www.microsoft.com/appliedsciences/antighostingexplained.mspx FWIW, on my Mac keyboard I can press all 4 arrow keys simultaneously and they are all recognized. - Bert - _______________________________________________ etoys-dev mailing list [hidden email] http://lists.squeakland.org/mailman/listinfo/etoys-dev |
I've added all the changes (except the events suggested by karl, which I haven't looked at yet). Here is a project for you to test.
If you agree I'll commit this to etoys. The question is: in which category should I add the KeyPressMorph? Maybe a new category called "Etoys-Keyboard"?
Cheers, Richo On Mon, Feb 20, 2012 at 8:59 AM, Bert Freudenberg <[hidden email]> wrote:
_______________________________________________ etoys-dev mailing list [hidden email] http://lists.squeakland.org/mailman/listinfo/etoys-dev Keyboard2.001.pr (117K) Download Attachment |
This works great on Windows.
I say it's good to go for inclusion. Category Scripting ? Or Just for Fun. Karl On Mon, Feb 20, 2012 at 9:28 PM, Ricardo Moran <[hidden email]> wrote: > I've added all the changes (except the events suggested by karl, which I > haven't looked at yet). Here is a project for you to test. > > If you agree I'll commit this to etoys. The question is: in which category > should I add the KeyPressMorph? Maybe a new category called > "Etoys-Keyboard"? > > Cheers, > Richo > > > On Mon, Feb 20, 2012 at 8:59 AM, Bert Freudenberg <[hidden email]> > wrote: >> >> On 20.02.2012, at 00:10, Ricardo Moran wrote: >> >> > 2012/2/17 K. K. Subramaniam <[hidden email]> >> >> I tried it on Linux (Kubuntu 10.04). Single and double key presses work >> >> as >> >> expected. But third and further keys are ignored (i.e. up+left+right >> >> acts as >> >> up+left instead of up). >> >> >> > Yes, that happens to me also (in windows). I think that is a limitation >> > of the arrow keys, it works when using the WASD keys. >> >> It's a limitation of cheap keyboard hardware. Here is a good explanation: >> >> http://www.microsoft.com/appliedsciences/antighostingexplained.mspx >> >> FWIW, on my Mac keyboard I can press all 4 arrow keys simultaneously and >> they are all recognized. >> >> - Bert - >> >> _______________________________________________ >> squeakland mailing list >> [hidden email] >> http://lists.squeakland.org/mailman/listinfo/squeakland > > > > _______________________________________________ > squeakland mailing list > [hidden email] > http://lists.squeakland.org/mailman/listinfo/squeakland > etoys-dev mailing list [hidden email] http://lists.squeakland.org/mailman/listinfo/etoys-dev |
On Mon, Feb 20, 2012 at 7:27 PM, karl ramberg <[hidden email]> wrote: This works great on Windows. Great!
Oh, yeah, I meant a category in the System Browser. For the Object Catalog I think "Just for Fun" is good. Cheers, Richo
_______________________________________________ etoys-dev mailing list [hidden email] http://lists.squeakland.org/mailman/listinfo/etoys-dev |
In reply to this post by Ricardo Moran
On Tuesday 21 Feb 2012 1:58:38 AM Ricardo Moran wrote:
> If you agree I'll commit this to etoys. The question is: in which category > should I add the KeyPressMorph? Maybe a new category called > "Etoys-Keyboard"? There are two parts to this extension - one which adds a new morph and another which adds Etoys tiles to make use of this morph's capabilities. IMHO, the keypress morph could go into Morphic-Events and the tiles could go into Etoys- Buttons or into a new generic category (say Etoys-Input). HTH .. Subbu _______________________________________________ etoys-dev mailing list [hidden email] http://lists.squeakland.org/mailman/listinfo/etoys-dev |
2012/2/21 K. K. Subramaniam <[hidden email]>
I don't know. I see this as a conceptual unit and splitting it in two packages seems too complicated for such a simple morph. Also, I see no value in adding it to the Morphic package since its only purpose lies within Etoys. I mean, without Etoys why would you want this morph?
So, I'll just put it in a new generic category "Etoys-Input". Thanks, Richo
_______________________________________________ etoys-dev mailing list [hidden email] http://lists.squeakland.org/mailman/listinfo/etoys-dev |
On Wednesday 22 Feb 2012 6:57:19 AM Ricardo Moran wrote:
> I don't know. I see this as a conceptual unit and splitting it in two > packages seems too complicated for such a simple morph. Also, I see no > value in adding it to the Morphic package since its only purpose lies > within Etoys. I mean, without Etoys why would you want this morph? > So, I'll just put it in a new generic category "Etoys-Input". Ricardo, It is not about what is it *is* but about what it *can be*. I suppose you can check them into Etoys for now and then devs interested in the larger scope could factor them out. I had future smartphones and handhelds in mind when I recommended that KeyPress be put into Morphic-Events. Your code may appear small and trivial to you but for people creating morphic apps bringing up soft-keyboards just for a few control keys is an overkill. Sprinkling these soft buttons around or making custom soft-key panels is a better idea. Regards .. Subbu _______________________________________________ etoys-dev mailing list [hidden email] http://lists.squeakland.org/mailman/listinfo/etoys-dev |
Free forum by Nabble | Edit this page |