summaryrefslogtreecommitdiff
path: root/src/Fl_win32.cxx
diff options
context:
space:
mode:
authorMichael R Sweet <michael.r.sweet@gmail.com>2004-10-18 20:22:25 +0000
committerMichael R Sweet <michael.r.sweet@gmail.com>2004-10-18 20:22:25 +0000
commitbf910884ccd3b3fb0655799feee83adcbc35a3a9 (patch)
treee48c4008467d4320381e26027b79fda5a410dc5d /src/Fl_win32.cxx
parentf7fd28ddfc97f5ff289ad6e916d012848583c192 (diff)
Documentation updates (STR #570)
Added DESTDIR support and now remove all man pages for the "uninstall" target (STR #545) Fix PNG drawing on buggy WIN32 graphics cards (STR #548) The configure script didn't propagate the CPPFLAGS environment variable (STR #549) The numpad keys didn't work properly on WIN32 (STR #502) fl_input() and friends now set the input focus to the text field when the dialog is shown (STR #553) Fixed background color mixup when drawing Fl_Choice menus (STR #544) Fixed MingW makefiles (STR #550) More VC++ project file tweaking (STR #559) Fl_PNG_Image didn't use the png_set_trns_to_alpha function when available (STR #547) The FL_UNFOCUS event wasn't always sent when switching tabs (STR #558) git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@3868 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/Fl_win32.cxx')
-rw-r--r--src/Fl_win32.cxx57
1 files changed, 51 insertions, 6 deletions
diff --git a/src/Fl_win32.cxx b/src/Fl_win32.cxx
index d05427622..4e73eaf6d 100644
--- a/src/Fl_win32.cxx
+++ b/src/Fl_win32.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: Fl_win32.cxx,v 1.33.2.37.2.49 2004/06/01 01:08:50 easysw Exp $"
+// "$Id: Fl_win32.cxx,v 1.33.2.37.2.50 2004/10/18 20:22:24 easysw Exp $"
//
// WIN32-specific code for the Fast Light Tool Kit (FLTK).
//
@@ -726,10 +726,55 @@ static LRESULT CALLBACK WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lPar
if (uMsg == WM_CHAR || uMsg == WM_SYSCHAR) {
buffer[0] = char(wParam);
Fl::e_length = 1;
- } else if (Fl::e_keysym >= FL_KP && Fl::e_keysym <= FL_KP_Last &&
- (state & FL_NUM_LOCK)) {
- buffer[0] = Fl::e_keysym-FL_KP;
- Fl::e_length = 1;
+ } else if (Fl::e_keysym >= FL_KP && Fl::e_keysym <= FL_KP_Last) {
+ if (state & FL_NUM_LOCK) {
+ // Convert to regular keypress...
+ buffer[0] = Fl::e_keysym-FL_KP;
+ Fl::e_length = 1;
+ } else {
+ // Convert to special keypress...
+ buffer[0] = 0;
+ Fl::e_length = 0;
+ switch (Fl::e_keysym) {
+ case FL_KP + '0' :
+ Fl::e_keysym = Fl_Insert;
+ break;
+ case FL_KP + '1' :
+ Fl::e_keysym = Fl_End;
+ break;
+ case FL_KP + '2' :
+ Fl::e_keysym = Fl_Down;
+ break;
+ case FL_KP + '3' :
+ Fl::e_keysym = Fl_Page_Down;
+ break;
+ case FL_KP + '4' :
+ Fl::e_keysym = Fl_Left;
+ break;
+ case FL_KP + '6' :
+ Fl::e_keysym = Fl_Right;
+ break;
+ case FL_KP + '7' :
+ Fl::e_keysym = Fl_Home;
+ break;
+ case FL_KP + '8' :
+ Fl::e_keysym = Fl_Up;
+ break;
+ case FL_KP + '9' :
+ Fl::e_keysym = Fl_Page_Up;
+ break;
+ case FL_KP + '.' :
+ Fl::e_keysym = Fl_Delete;
+ break;
+ case FL_KP + '/' :
+ case FL_KP + '*' :
+ case FL_KP + '-' :
+ case FL_KP + '+' :
+ buffer[0] = Fl::e_keysym-FL_KP;
+ Fl::e_length = 1;
+ break;
+ }
+ }
} else {
buffer[0] = 0;
Fl::e_length = 0;
@@ -1196,5 +1241,5 @@ void Fl_Window::make_current() {
}
//
-// End of "$Id: Fl_win32.cxx,v 1.33.2.37.2.49 2004/06/01 01:08:50 easysw Exp $".
+// End of "$Id: Fl_win32.cxx,v 1.33.2.37.2.50 2004/10/18 20:22:24 easysw Exp $".
//