why cannot the Shift+Tab key be detected?

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

why cannot the Shift+Tab key be detected?

Chris Muller-4
I would like to map outdent to Shift+Tab when there is a selection.

I can detect the Tab key, but Shift+Tab never makes it to the event handler.

In fact, even

    Sensor kbdTest

seems to be able to detect Shift+Tab.

Any ideas why?

Reply | Threaded
Open this post in threaded view
|

Re: why cannot the Shift+Tab key be detected?

Chris Muller-3

In fact, even

Oops, I meant NOT even...
 

    Sensor kbdTest

seems to be able to detect Shift+Tab.

Any ideas why?




Reply | Threaded
Open this post in threaded view
|

Re: why cannot the Shift+Tab key be detected?

marcel.taeumel
In reply to this post by Chris Muller-4
Hi Chris,

putting this into TextEditor >> #dispatchKeyboardEvent: brings the expected effect:

(aKeyboardEvent shiftPressed and: [aKeyboardEvent keyCharacter = Character tab])
        ifTrue: [self halt].

So, everything works fine. Maybe it is because those text editors handle those events and the Morphic event handler does refuse to handle them? Where do you try to handle it? You have to use TextMorphForEditView, because the PluggableTextMorph(Plus) gets keyboard events only in rare occasions...

Best,
Marcel
Reply | Threaded
Open this post in threaded view
|

Re: why cannot the Shift+Tab key be detected?

Chris Muller-3
Well, we may have a VM bug then.  I just booted my laptop into in Windows and that Squeak VM was able to detect Shift+Tab.  However, back in Linux VM (both Cog and Spur 3427), Shift+Tab is not even detected by Sensor.

I went into GEdit of Ubuntu and Shift+Tab works there...

Eliot, could this be a bug in the Linux VM?

Thanks.

On Mon, Oct 19, 2015 at 11:48 AM, marcel.taeumel <[hidden email]> wrote:
Hi Chris,

putting this into TextEditor >> #dispatchKeyboardEvent: brings the expected
effect:

(aKeyboardEvent shiftPressed and: [aKeyboardEvent keyCharacter = Character
tab])
        ifTrue: [self halt].

So, everything works fine. Maybe it is because those text editors handle
those events and the Morphic event handler does refuse to handle them? Where
do you try to handle it? You have to use TextMorphForEditView, because the
PluggableTextMorph(Plus) gets keyboard events only in rare occasions...

Best,
Marcel



--
View this message in context: http://forum.world.st/why-cannot-the-Shift-Tab-key-be-detected-tp4856508p4856519.html
Sent from the Squeak - Dev mailing list archive at Nabble.com.




Reply | Threaded
Open this post in threaded view
|

Re: why cannot the Shift+Tab key be detected?

timrowledge

> On 19-10-2015, at 11:23 AM, Chris Muller <[hidden email]> wrote:
>
> Well, we may have a VM bug then.  I just booted my laptop into in Windows and that Squeak VM was able to detect Shift+Tab.  However, back in Linux VM (both Cog and Spur 3427), Shift+Tab is not even detected by Sensor.
>
> I went into GEdit of Ubuntu and Shift+Tab works there...
>
> Eliot, could this be a bug in the Linux VM?

The most likely place for a problem would be the platforms/unix/sqWindows.c (or maybe sqEvents.c ?) since the interpreter and cog trees are not currently in sync. If a change to make tab get handled was put into the interpreter tree it may very well have not made it to cog yet. It’s even possible that the combination simply doesn’t get handled by the OS keyboard handler; I’ve seen siilar problems before now.

tim
--
tim Rowledge; [hidden email]; http://www.rowledge.org/tim
Ignoranus (n): A person who's both stupid and an asshole.



Reply | Threaded
Open this post in threaded view
|

Re: why cannot the Shift+Tab key be detected?

Chris Muller-3
> It’s even possible that the combination simply doesn’t get handled by the OS keyboard handler; I’ve seen siilar
> problems before now.

I wondered that too, which is why I verified it working in GEdit...