Getting the last keyboard key pressed when using a RubScrolledTextMorph

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

Getting the last keyboard key pressed when using a RubScrolledTextMorph

jfabry
Hi all,

the code below gives me the number representing the last keystroke. It is a bit of a hack, so I was wondering if there is a cleaner way to do this when using a RubScrolledTextMorph (I tried subscribing to different announcements to no avail).

World activeHand instVarNamed: #lastKeyScanCode.


---> Save our in-boxes! http://emailcharter.org <---

Johan Fabry   -   http://pleiad.cl/~jfabry
PLEIAD lab  -  Computer Science Department (DCC)  -  University of Chile


Reply | Threaded
Open this post in threaded view
|

Re: Getting the last keyboard key pressed when using a RubScrolledTextMorph

abergel
I would expect proper announcement to be created. The small experiment we did in your office suggests this.

Cheers,
Alexandre
-- 
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.



On Apr 6, 2015, at 3:12 PM, Johan Fabry <[hidden email]> wrote:

Hi all,

the code below gives me the number representing the last keystroke. It is a bit of a hack, so I was wondering if there is a cleaner way to do this when using a RubScrolledTextMorph (I tried subscribing to different announcements to no avail).

World activeHand instVarNamed: #lastKeyScanCode.


---> Save our in-boxes! http://emailcharter.org <---

Johan Fabry   -   http://pleiad.cl/~jfabry
PLEIAD lab  -  Computer Science Department (DCC)  -  University of Chile



Reply | Threaded
Open this post in threaded view
|

Re: Getting the last keyboard key pressed when using a RubScrolledTextMorph

jfabry

Sadly not, because with that experiment there is a DNU when opening the editor which is quite strange. I can show you tomorrow if you like ;-)

On Apr 6, 2015, at 15:31, Alexandre Bergel <[hidden email]> wrote:

I would expect proper announcement to be created. The small experiment we did in your office suggests this.

Cheers,
Alexandre
-- 
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.



On Apr 6, 2015, at 3:12 PM, Johan Fabry <[hidden email]> wrote:

Hi all,

the code below gives me the number representing the last keystroke. It is a bit of a hack, so I was wondering if there is a cleaner way to do this when using a RubScrolledTextMorph (I tried subscribing to different announcements to no avail).

World activeHand instVarNamed: #lastKeyScanCode.


---> Save our in-boxes! http://emailcharter.org <---

Johan Fabry   -   http://pleiad.cl/~jfabry
PLEIAD lab  -  Computer Science Department (DCC)  -  University of Chile






---> Save our in-boxes! http://emailcharter.org <---

Johan Fabry   -   http://pleiad.cl/~jfabry
PLEIAD lab  -  Computer Science Department (DCC)  -  University of Chile