comparison os2/dw.c @ 293:315812516608

Changes to the key press handling, if the character is zero check the virtual key code. The virtual key code parameter will always be valid. Also print the character in hex so it can be seen in the test program.
author bsmith@81767d24-ef19-dc11-ae90-00e081727c95
date Tue, 25 Mar 2003 23:44:57 +0000
parents 8ea5b2c35bfe
children caed245ea8a1
comparison
equal deleted inserted replaced
292:651b70046c6a 293:315812516608
1975 int (* API keypressfunc)(HWND, char, int, int, void *) = (int (* API)(HWND, char, int, int, void *))tmp->signalfunction; 1975 int (* API keypressfunc)(HWND, char, int, int, void *) = (int (* API)(HWND, char, int, int, void *))tmp->signalfunction;
1976 1976
1977 if(hWnd == tmp->window && !(SHORT1FROMMP(mp1) & KC_KEYUP)) 1977 if(hWnd == tmp->window && !(SHORT1FROMMP(mp1) & KC_KEYUP))
1978 { 1978 {
1979 int vk; 1979 int vk;
1980 char ch; 1980 char ch = 0;
1981 1981
1982 if(SHORT1FROMMP(mp1) & KC_CHAR) 1982 if(SHORT1FROMMP(mp1) & KC_CHAR)
1983 ch = (char)SHORT1FROMMP(mp2); 1983 ch = (char)SHORT1FROMMP(mp2);
1984 else
1985 ch = (char)SHORT2FROMMP(mp2);
1986 if(SHORT1FROMMP(mp1) & KC_VIRTUALKEY) 1984 if(SHORT1FROMMP(mp1) & KC_VIRTUALKEY)
1987 vk = SHORT2FROMMP(mp2); 1985 vk = SHORT2FROMMP(mp2);
1988 else 1986 else
1989 vk = SHORT1FROMMP(mp2); 1987 vk = SHORT1FROMMP(mp2);
1990 1988