[Plib-devel] pwWindows.cxx change
Brought to you by:
sjbaker
From: Fay J. F C. AAC/W. <joh...@eg...> - 2004-05-10 17:20:29
|
Gentlemen, There is a patch for "pwWindows.cxx" that will make its behaviour with auto-repeating keys match the behaviour under Unix. It starts at line 122: case WM_KEYDOWN: /* If the key is already down, we are on auto-repeat. Break if the autorepeat is disabled. */ - if ( ( updown == PW_DOWN ) && ( int(wParam) == old_key ) && !autoRepeat ) break ; + if ( ( updown == PW_DOWN ) && ( int(wParam) == old_key ) ) + { + if ( autoRepeat ) + { + /* Disable CTRL, SHIFT, CapsLock keys from making a callback */ + if ( ( key == VK_CONTROL ) || ( key == VK_SHIFT ) || ( key == VK_CAPITAL ) ) + break ; + + if ( key != -1 && kbCB ) // Autorepeat enabled, call the callback with an "up" setting + (*kbCB) ( key, PW_UP, lastx, lasty ) ; + } + else + break ; // Autorepeat not enabled, just break + } updown = PW_DOWN ; old_key = wParam ; /* FALLTHROUGH */ John F. Fay joh...@eg... |