[squeak-dev] serious bugs with keyboard events in recent updates

Craig Latta craig at blackpagedigital.com
Tue Jun 29 01:09:51 UTC 2021


      I saw this too, when I attempted to debug the aarch64 arithmetic 
error on macOS (which ended with the GdbARMv8Plugin primitive-failing 
during startup). It seems to be a newly-introduced VM bug, since none of 
the fiddling I did at the image level about which event element means 
what gave me a fully-functioning keyboard. The best I could get was a 
working shift key for capitals, but no meta keys.


-C

***

    On 28/6/21 11:18, Eliot Miranda wrote:

 > Hi All,
 >
 >      is anyone seeing Character>>doesNotUnderratand: #bitShift: errors
 > as a result of recent updates? It appears that an event's fifth element
 > is now a Character, not mouse buttons plus metakey state codes.  There
 > seems to be some confusion somewhere in creating events.  I'm trying to
 > understand if this is an image level bug or a VM bug.  Here are the
 > definitions in sq.h which show that modifiers are not always in the same
 > place in every event:
 >
 > #define EventTypeMouse      1
 > /* mouse input event */
 > typedef struct sqMouseEvent {
 >    sqIntptr_t type;          /* EventTypeMouse */
 >    usqIntptr_t timeStamp;    /* time stamp */
 >    sqIntptr_t x;             /* mouse position x */
 >    sqIntptr_t y;             /* mouse position y */
 >    sqIntptr_t buttons;       /* combination of xxxButtonBit */
 > 5 sqIntptr_t modifiers;     /* combination of xxxKeyBit */
 >    sqIntptr_t nrClicks;      /* number of clicks in button downs - was
 > reserved1 */
 >    sqIntptr_t windowIndex;   /* host window structure */
 > } sqMouseEvent;
 >
 > #define EventTypeKeyboard   2
 > /* keyboard input event */
 > typedef struct sqKeyboardEvent {
 >    sqIntptr_t type;          /* EventTypeKeyboard */
 >    usqIntptr_t timeStamp;    /* time stamp */
 >    sqIntptr_t charCode;      /* character code in Mac Roman encoding */
 >    sqIntptr_t pressCode;     /* press code; any of EventKeyXXX */
 > 4 sqIntptr_t modifiers;     /* combination of xxxKeyBit */
 >    sqIntptr_t utf32Code;     /* UTF-32 unicode value */
 >    sqIntptr_t reserved1;     /* reserved for future use */
 >    sqIntptr_t windowIndex;   /* host window structure */
 > } sqKeyboardEvent;
 >
 > #define EventTypeDragDropFiles  3
 > /* drop files event */
 > typedef struct sqDragDropFilesEvent {
 >    sqIntptr_t type;          /* EventTypeDropFiles */
 >    usqIntptr_t timeStamp;    /* time stamp */
 >    sqIntptr_t dragType;      /* one of DragXXX (see below) */
 >    sqIntptr_t x;             /* mouse position x */
 >    sqIntptr_t y;             /* mouse position y */
 > 5 sqIntptr_t modifiers;     /* combination of xxxKeyBit */
 >    sqIntptr_t numFiles;      /* number of files in transaction */
 >    sqIntptr_t windowIndex;   /* host window structure */
 > } sqDragDropFilesEvent;
 >
 > Is the bug that the VM has modifiers and utf32Code in the wrong order in
 > sqKeyboardEvent?  Or is it an image level bug?
 >
 > _,,,^..^,,,_
 > best, Eliot

--
Craig Latta  ::  research computer scientist
Black Page Digital  ::  Berkeley, California
663137D7940BF5C0AFC :: 1349FB2ADA32C4D5314CE




More information about the Squeak-dev mailing list