Mantis Bugtracker
  

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0007611 [Squeak] VM minor always 03-07-11 00:06 03-07-11 00:06
Reporter lewis View Status public  
Assigned To lewis
Priority normal Resolution open  
Status assigned   Product Version
Summary 0007611: Windows VM not handling <ctl><m> properly
Description Windows VM does not report <ctl><m> key events properly. Problem reported with suggested fix on vm-dev at http://lists.squeakfoundation.org/pipermail/vm-dev/2011-March/006972.html [^]

Additional background is at http://code.google.com/p/pharo/issues/detail?id=1064 [^]
Additional Information Issue is reported as a "cog bug" but presumably affects standard VM also, as they share identical support code. The suggested fix (see links above) is:

===

'ctrl + m' problem is Cog VM bug.

Normally, when character key is pushed, keyboard events occur as follows on
Squeak.

1. key press (down)
2. character (character code notification)
3. key release (up)

They are produced by a primitive method in IutEventFetcher >>
primGetNextEvent.
But when ctrl + m is pushed, a character event doesn't occur.
Because 'ctrl + m' value is 13. The value is same as ENTER key.
Cog VM ignores WM_CHAR message(character event) when ENTER key is pushed.

The one of solution for this problem is to add CTRL key state to the
if-condition.

-- sqWin32Window.c --

int recordKeyboardEvent(MSG *msg) {
 ...

 switch(msg->message) {
   ...

   case WM_CHAR:
   case WM_SYSCHAR:
     /* Note: VK_RETURN is recorded as virtual key ONLY */
     if(keyCode == 13 && !ctrl) return 1; // add "&& !ctrl"
     pressCode = EventKeyChar;
     break;
   ...
 }
 ...

Note: ENTER keyCode is 13. But when ctrl + ENTER is pushed, the keyCode is
10.
So if the condition is revised, ctrl + m problem is corrected.
but other behavior is not changed.


If you want to prevent to generate character event for CTRL + ENTER,
you can add following code. By this way, we can produce
not only ctrl+m (0x0D)'s character event but also ctrl+j (0x0A)'s one.

Attached Files

- Relationships

There are no notes attached to this issue.

- Issue History
Date Modified Username Field Change
03-07-11 00:06 lewis New Issue
03-07-11 00:06 lewis Status new => assigned
03-07-11 00:06 lewis Assigned To  => lewis


Mantis 1.0.8[^]
Copyright © 2000 - 2007 Mantis Group
29 total queries executed.
26 unique queries executed.
Powered by Mantis Bugtracker