Sensor shiftPressed

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Sensor shiftPressed

Eliot Miranda-2
Hi All,

    Sensor shiftPressed no longer functions.  Is there a replacement?  If so, what is it, and can we mark shiftPressed as deprecated?  If not, can it be fixed?  It's the escape key in the debugger's runUntil, and useful for turning off display update when things are running for a very long time.
_,,,^..^,,,_
best, Eliot


Reply | Threaded
Open this post in threaded view
|

Re: Sensor shiftPressed

timrowledge

> On 27-12-2016, at 10:51 AM, Eliot Miranda <[hidden email]> wrote:
>
> Hi All,
>
>     Sensor shiftPressed no longer functions.  Is there a replacement?

At least for Scratch not-quite-events, ‘self currentHand lastEvent’ works to get  the most recent event. I use it in ScratchFrameMorph>buildShareMenu: for example -
‘self currentHand lastEvent shiftPressed ifTrue:[
        aDockingBarMenuMorph addLine’….

There’s also the option of just sucking in my KeyboardStateWatcher that listens to incoming events and tracks the currently pressed keys etc.


tim
--
tim Rowledge; [hidden email]; http://www.rowledge.org/tim
Useful Latin Phrases:- Gramen artificiosum odi = I hate Astroturf.



Reply | Threaded
Open this post in threaded view
|

Re: Sensor shiftPressed

Bert Freudenberg
In reply to this post by Eliot Miranda-2
On Tue, Dec 27, 2016 at 7:51 PM, Eliot Miranda <[hidden email]> wrote:
Hi All,

    Sensor shiftPressed no longer functions. 

No? Which platform / vm?

This works for me:

(UpdatingStringMorph on: Sensor selector: #shiftPressed) openInHand

... albeit on the Mac you have to wiggle the mouse too because the Cocoa VM does not send keyboard events for shift.
 
can it be fixed?
 
I'm sure the VM can be fixed ;)

- Bert -



Reply | Threaded
Open this post in threaded view
|

Re: Sensor shiftPressed

Eliot Miranda-2


On Wed, Dec 28, 2016 at 5:49 AM, Bert Freudenberg <[hidden email]> wrote:
On Tue, Dec 27, 2016 at 7:51 PM, Eliot Miranda <[hidden email]> wrote:
Hi All,

    Sensor shiftPressed no longer functions. 

No? Which platform / vm?

This works for me:

(UpdatingStringMorph on: Sensor selector: #shiftPressed) openInHand

... albeit on the Mac you have to wiggle the mouse too because the Cocoa VM does not send keyboard events for shift.

Ah!  So that's the problem :-/.  Thanks!
 
 
can it be fixed?
 
I'm sure the VM can be fixed ;)

Indeed :-)
 
- Bert -

_,,,^..^,,,_
best, Eliot


Reply | Threaded
Open this post in threaded view
|

Re: Sensor shiftPressed

johnmci
In reply to this post by Bert Freudenberg
I do have a possible fix, trying to connect to Eliot to do some testing

On Wed, Dec 28, 2016 at 5:49 AM, Bert Freudenberg <[hidden email]> wrote:
On Tue, Dec 27, 2016 at 7:51 PM, Eliot Miranda <[hidden email]> wrote:
Hi All,

    Sensor shiftPressed no longer functions. 

No? Which platform / vm?

This works for me:

(UpdatingStringMorph on: Sensor selector: #shiftPressed) openInHand

... albeit on the Mac you have to wiggle the mouse too because the Cocoa VM does not send keyboard events for shift.
 
can it be fixed?
 
I'm sure the VM can be fixed ;)

- Bert -







--
===========================================================================
John M. McIntosh. Corporate Smalltalk Consulting Ltd https://www.linkedin.com/in/smalltalk
===========================================================================