comparison src/event-msw.c @ 286:57709be46d1b r21-0b41

Import from CVS: tag r21-0b41
author cvs
date Mon, 13 Aug 2007 10:35:03 +0200
parents 558f606b08ae
children e11d67e05968
comparison
equal deleted inserted replaced
285:9a3756523c1b 286:57709be46d1b
1598 1598
1599 /* Have some WM_[SYS]CHARS in the queue */ 1599 /* Have some WM_[SYS]CHARS in the queue */
1600 TranslateMessage (&msg); 1600 TranslateMessage (&msg);
1601 1601
1602 while (PeekMessage (&msg, hwnd, WM_CHAR, WM_CHAR, PM_REMOVE) 1602 while (PeekMessage (&msg, hwnd, WM_CHAR, WM_CHAR, PM_REMOVE)
1603 ||PeekMessage (&msg, hwnd, WM_SYSCHAR, WM_SYSCHAR, PM_REMOVE)) 1603 || PeekMessage (&msg, hwnd, WM_SYSCHAR, WM_SYSCHAR, PM_REMOVE))
1604 { 1604 {
1605 int ch = msg.wParam; 1605 WPARAM ch = msg.wParam;
1606 /* CH is a character code for the key: 1606 /* CH is a character code for the key:
1607 'C' for Shift+C and Ctrl+Shift+C 1607 'C' for Shift+C and Ctrl+Shift+C
1608 'c' for c and Ctrl+c */ 1608 'c' for c and Ctrl+c */
1609 1609
1610 /* #### If locale is not C, US or other latin-1,
1611 isalpha() maybe not what do we mean */
1612
1613 /* XEmacs doesn't seem to like Shift on non-alpha keys */ 1610 /* XEmacs doesn't seem to like Shift on non-alpha keys */
1614 if (!isalpha(ch)) 1611 if (!IsCharAlpha ((TCHAR)ch))
1615 mods &= ~MOD_SHIFT; 1612 mods &= ~MOD_SHIFT;
1616
1617 /* Un-capitalise alpha control keys */
1618 if ((mods & MOD_CONTROL) && isalpha(ch))
1619 ch |= ('A' ^ 'a');
1620 1613
1621 /* If a quit char with no modifiers other than control and 1614 /* If a quit char with no modifiers other than control and
1622 shift, then mark it with a fake modifier, which is removed 1615 shift, then mark it with a fake modifier, which is removed
1623 upon dequeueing the event */ 1616 upon dequeueing the event */
1624 /* #### This might also not withstand localization, if 1617 /* #### This might also not withstand localization, if