Ctrl key on Windows

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

Ctrl key on Windows

Guillermo Polito
First, Thanks Nicolai :)

I was testing the latest windows VM In my gf's machine to see the fix of Nicolai to the Ctrl+friends.

For those who do not know, before, the windows (and unix, and mac too) VMs mapped some Ctrl+key combinations to another one simulating emacs/terminal shortcuts. For example:

Ctrl+a => Ctrl home
Ctrl+d => Ctrl end

The problem of this, is that the image never received a Ctrl+a event, and thus, Ctrl+a and Ctrl+home were not distinguishable.

Nicolai did a fix in the Windows VM for this and I'm glad to see that most of the keys that did not work before now work. I tested it by disabling the global shortcuts and using the following script:

w := SystemWindow new.

($a to: $z) do: [ :k|
    w bindKeyCombination: k ctrl toAction: [ :a :b :c | UIManager default inform: c asString ]].

w addMorphBack: TextMorph new.
w openInWorld.

Using that I saw however that the Ctrl+m combination does not reach my handler and there are no global handlers for it. The event does however arrive to the image (checked using the InputEventFetcher).

Then I have two questions for the world:

- Does anyone have an idea of who may be catching the Ctrl+m?
- What do we have to do to bless the latest Windows VM as stable?

Guille
Reply | Threaded
Open this post in threaded view
|

Re: Ctrl key on Windows

Nicolai Hess


2015-08-17 21:16 GMT+02:00 Guillermo Polito <[hidden email]>:
First, Thanks Nicolai :)

I was testing the latest windows VM In my gf's machine to see the fix of Nicolai to the Ctrl+friends.

For those who do not know, before, the windows (and unix, and mac too) VMs mapped some Ctrl+key combinations to another one simulating emacs/terminal shortcuts. For example:

Ctrl+a => Ctrl home
Ctrl+d => Ctrl end

The problem of this, is that the image never received a Ctrl+a event, and thus, Ctrl+a and Ctrl+home were not distinguishable.

Nicolai did a fix in the Windows VM for this and I'm glad to see that most of the keys that did not work before now work. I tested it by disabling the global shortcuts and using the following script:

w := SystemWindow new.

($a to: $z) do: [ :k|
    w bindKeyCombination: k ctrl toAction: [ :a :b :c | UIManager default inform: c asString ]].

w addMorphBack: TextMorph new.
w openInWorld.

Using that I saw however that the Ctrl+m combination does not reach my handler and there are no global handlers for it. The event does however arrive to the image (checked using the InputEventFetcher).

Then I have two questions for the world:

- Does anyone have an idea of who may be catching the Ctrl+m?
- What do we have to do to bless the latest Windows VM as stable?

Guille


Hi Guille,

the problem with my fix for ctrl+a vs. ctrl+home is, that we do not get ctrl+space keystrokes anymore :(
But I know how to fix this.

The problem with ctrl+m is that it does not generate a keychar-Event, only keyup and keydown (similar ctrl+<somenumber> or ctrl+tab), it is recognized
as a keyevent but only keychar-events are used as keystrokes.



Reply | Threaded
Open this post in threaded view
|

Re: Ctrl key on Windows

stepharo
Igor is working with esteban to fix the VM to accept SDL. I fixed the Windows VM before.
So I hope that we will finally a good keyhandling.

Stef

Le 17/8/15 23:28, Nicolai Hess a écrit :


2015-08-17 21:16 GMT+02:00 Guillermo Polito <[hidden email]>:
First, Thanks Nicolai :)

I was testing the latest windows VM In my gf's machine to see the fix of Nicolai to the Ctrl+friends.

For those who do not know, before, the windows (and unix, and mac too) VMs mapped some Ctrl+key combinations to another one simulating emacs/terminal shortcuts. For example:

Ctrl+a => Ctrl home
Ctrl+d => Ctrl end

The problem of this, is that the image never received a Ctrl+a event, and thus, Ctrl+a and Ctrl+home were not distinguishable.

Nicolai did a fix in the Windows VM for this and I'm glad to see that most of the keys that did not work before now work. I tested it by disabling the global shortcuts and using the following script:

w := SystemWindow new.

($a to: $z) do: [ :k|
    w bindKeyCombination: k ctrl toAction: [ :a :b :c | UIManager default inform: c asString ]].

w addMorphBack: TextMorph new.
w openInWorld.

Using that I saw however that the Ctrl+m combination does not reach my handler and there are no global handlers for it. The event does however arrive to the image (checked using the InputEventFetcher).

Then I have two questions for the world:

- Does anyone have an idea of who may be catching the Ctrl+m?
- What do we have to do to bless the latest Windows VM as stable?

Guille


Hi Guille,

the problem with my fix for ctrl+a vs. ctrl+home is, that we do not get ctrl+space keystrokes anymore :(
But I know how to fix this.

The problem with ctrl+m is that it does not generate a keychar-Event, only keyup and keydown (similar ctrl+<somenumber> or ctrl+tab), it is recognized
as a keyevent but only keychar-events are used as keystrokes.




Reply | Threaded
Open this post in threaded view
|

Re: Ctrl key on Windows

Ben Coman
In reply to this post by Nicolai Hess
On Tue, Aug 18, 2015 at 5:28 AM, Nicolai Hess <[hidden email]> wrote:

>
>
> 2015-08-17 21:16 GMT+02:00 Guillermo Polito <[hidden email]>:
>>
>> First, Thanks Nicolai :)
>>
>> I was testing the latest windows VM In my gf's machine to see the fix of
>> Nicolai to the Ctrl+friends.
>>
>> For those who do not know, before, the windows (and unix, and mac too) VMs
>> mapped some Ctrl+key combinations to another one simulating emacs/terminal
>> shortcuts. For example:
>>
>> Ctrl+a => Ctrl home
>> Ctrl+d => Ctrl end
>>
>> The problem of this, is that the image never received a Ctrl+a event, and
>> thus, Ctrl+a and Ctrl+home were not distinguishable.
>>
>> Nicolai did a fix in the Windows VM for this and I'm glad to see that most
>> of the keys that did not work before now work. I tested it by disabling the
>> global shortcuts and using the following script:
>>
>> w := SystemWindow new.
>>
>> ($a to: $z) do: [ :k|
>>     w bindKeyCombination: k ctrl toAction: [ :a :b :c | UIManager default
>> inform: c asString ]].
>>
>> w addMorphBack: TextMorph new.
>> w openInWorld.
>>
>> Using that I saw however that the Ctrl+m combination does not reach my
>> handler and there are no global handlers for it. The event does however
>> arrive to the image (checked using the InputEventFetcher).
>>
>> Then I have two questions for the world:
>>
>> - Does anyone have an idea of who may be catching the Ctrl+m?
>> - What do we have to do to bless the latest Windows VM as stable?
>>
>> Guille
>
>
>
> Hi Guille,
>
> the problem with my fix for ctrl+a vs. ctrl+home is, that we do not get
> ctrl+space keystrokes anymore :(
> But I know how to fix this.
>
> The problem with ctrl+m is that it does not generate a keychar-Event, only
> keyup and keydown (similar ctrl+<somenumber> or ctrl+tab), it is recognized
> as a keyevent but only keychar-events are used as keystrokes.
>
>
>

Some info I searched up, somewhat enlightening...

What's broken in the WM_KEYDOWN-WM_CHAR input model?
http://www.ngedit.com/a_wm_keydown_wm_char.html

MSDN > Accelerator Tables
https://msdn.microsoft.com/en-us/library/windows/desktop/ms646335(v=vs.85).aspx
https://msdn.microsoft.com/en-us/library/windows/desktop/ms646337(v=vs.85).aspx#acc_created_at_runtime

cheers -ben