[<<] [<] Page 1 of 2 [>] [>>] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Subject:
FLTK keyboard question
From: "Georg Potthast" ####@####.#### Date: 24 Jun 2011 19:34:47 -0000 Message-Id: <001e01cc32a5$c5be08a0$6800a8c0@SCHREIBTISCHGP> I managed to compile FLTK-1.1.3 with DJGPP. The demos work but I can make no keyboard input. I read in an old post that it would work with the kbd_ttyscan.c keyboard driver but not with the kbd_tty.c keyboard driver. I am using my kbd_dj keyboard driver. Do I need to make a change to that for FLTK? I see these commands in kbd_ttyscan.c: scancode = *buf & 0x7f; mwkey = keymap[scancode]; What is the purpose of those? Georg | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Subject:
Fw: [nanogui] FLTK keyboard question
From: "Georg Potthast" ####@####.#### Date: 26 Jun 2011 11:02:58 -0000 Message-Id: <001d01cc33f0$98eba750$6800a8c0@SCHREIBTISCHGP> Meanwhile I downloaded FLTK 1.1.10 and compiled that. Fluid did compile too. I observed that you can get some very buggy keyboard input when you press the "^" or "`" key before another key. So ^e or è will result in "w", ^a or à in "q". There are a lot of messages sent to STDERR. Is this done by NXLIB or FLTK? E.g. the editor example writes: XSetErrorHandler called nxlib: display bpp 16, bits_per_rgb 6 XGetDefault Text background XGetDefault fltk foreground XGetDefault fltk background XGetDefault Text selectBackground XGetDefault fltk dndTextOps XGetDefault fltk tooltips XGetDefault fltk visibleFocus XGetDefault fltk scheme nxTranslateEventMask no handler for event mask (0022c07f): 14 findfont: START cursor 0,0 findfont_nowild: fail findfont: FINI nowild cursor = (null) height 1592224 XLoadFont('cursor') = '(null)' height 1592224 [0] XRecolorCursor called XCreatePixmap 660,400 depth 16 findfont: START fixed 0,0 findfont_nowild: fail findfont: FINI nowild fixed = (null) height 11 findfont: START 6x13 0,0 findfont_nowild: fail findfont: FINI nowild 6x13 = (null) height 11 XLoadFont('fixed') = '(null)' height 11 [0] XRecolorCursor called findfont: START fixed 0,0 findfont_nowild: fail findfont: FINI nowild fixed = (null) height 1574328 findfont: START 6x13 0,0 findfont_nowild: fail findfont: FINI nowild 6x13 = (null) height 1574328 XLoadFont('fixed') = '(null)' height 1574328 [0] How can I suppress these messages? I currently redirect them to a file. Regards Georg | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Subject:
Fw: [nanogui] FLTK keyboard question
From: "Georg Potthast" ####@####.#### Date: 26 Jun 2011 17:47:19 -0000 Message-Id: <003601cc3429$17585470$6800a8c0@SCHREIBTISCHGP> Ten days ago, a new version of FLTK was released - version 1.3.0: http://fltk.org/articles.php?L1086 I downloaded that and got it to run. However, there is no text displayed in the demos. I got the following messages to STDERR: XSetLocaleModifiers called XSetErrorHandler called nxlib: display bpp 16, bits_per_rgb 6 XOpenIM called XOpenIM() failed XGetDefault Text background XGetDefault fltk foreground XGetDefault fltk background XGetDefault Text selectBackground XGetDefault fltk dndTextOps XGetDefault fltk tooltips XGetDefault fltk visibleFocus XGetDefault fltk scheme nxTranslateEventMask no handler for event mask (0022c07f): 14 findfont_nowild: fail With the old versions the system font was used. The code is: Fl_Box *box = new Fl_Box(20,40,300,100,"Hello, World!"); box->box(FL_UP_BOX); box->labelfont(FL_BOLD+FL_ITALIC); box->labelsize(36); box->labeltype(FL_SHADOW_LABEL); window->end(); That resulted in the following messages: XSetErrorHandler called nxlib: display bpp 16, bits_per_rgb 6 XGetDefault Text background XGetDefault fltk foreground XGetDefault fltk background XGetDefault Text selectBackground XGetDefault fltk dndTextOps XGetDefault fltk tooltips XGetDefault fltk visibleFocus XGetDefault fltk scheme nxTranslateEventMask no handler for event mask (0022c07f): 14 findfont: START fixed 0,0 findfont_nowild: fail findfont: FINI nowild fixed = (null) height 32 findfont: START 6x13 0,0 findfont_nowild: fail findfont: FINI nowild 6x13 = (null) height 32 XLoadFont('fixed') = '(null)' height 32 [0] So I did not get a 36 font but the fixed font. Do you have any suggestions how to get a font to work? Regards Georg | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Subject:
Re: [nanogui] FLTK keyboard question
From: "Greg Haerr" ####@####.#### Date: 27 Jun 2011 17:09:13 -0000 Message-Id: <EFAB8976B3D74880BD6BD0CC51450C17@winXP> > I read in an old post that it would work with the kbd_ttyscan.c keyboard > driver but not with the > kbd_tty.c keyboard driver. The former is a scancode driver that uses the values of the keyboard scancodes and looks up the keycode values from an internal table. The latter driver uses the OS-returned values after its internal processing. > I am using my kbd_dj keyboard driver. Do I need to make a change to that > for FLTK? No > What is the purpose of those? > scancode = *buf & 0x7f; > mwkey = keymap[scancode]; That's the scancode and the internal table lookup to get the key code value. Regards, Greg | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Subject:
Re: [nanogui] FLTK keyboard question
From: "Greg Haerr" ####@####.#### Date: 27 Jun 2011 17:14:18 -0000 Message-Id: <BDBAABE24AEA4FADAEBC2C8FE3B0AD3F@winXP> : Meanwhile I downloaded FLTK 1.1.10 and compiled that. Fluid did compile too. Does this version display text in the demos? : I observed that you can get some very buggy keyboard input when you press : the "^" or "`" key before another key. So ^e or è will result in "w", ^a or : à in "q". Are you running the ttyscan driver here? Sounds like it. What happens when you run the regular driver? : : There are a lot of messages sent to STDERR. Is this done by NXLIB or FLTK? : E.g. the editor example writes: : : XSetErrorHandler called : nxlib: display bpp 16, bits_per_rgb 6 : XLoadFont('fixed') = '(null)' height 1574328 [0] : : How can I suppress these messages? I currently redirect them to a file. NXLIB prints out most of these, they should be able to be turned off via the DEBUG=N in the Makefile. However, most of the stubs.c messages aren't wrapped with DPRINTF for quiet non-debug output, you may have patch them. Regards, Greg | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Subject:
Re: [nanogui] FLTK keyboard question
From: "Greg Haerr" ####@####.#### Date: 27 Jun 2011 17:18:22 -0000 Message-Id: <8AD6DC9FC3FB4C9AAB81A4B2BF86BBA6@winXP> > I downloaded that and got it to run. However, there is no text displayed > in the demos. No text at all, or small text. Do previous versions of FLTK work properly? > findfont_nowild: fail You need to look up the XLFD font spec that's being sent to "X11" for processing. This should be in the XLoadFont code. > With the old versions the system font was used. The code is: Fl_Box *box = new Fl_Box(20,40,300,100,"Hello, World!"); box->box(FL_UP_BOX); box->labelfont(FL_BOLD+FL_ITALIC); box->labelsize(36); box->labeltype(FL_SHADOW_LABEL); window->end(); That resulted in the following messages: findfont_nowild: fail findfont: FINI nowild fixed = (null) height 32 findfont: START 6x13 0,0 findfont_nowild: fail findfont: FINI nowild 6x13 = (null) height 32 XLoadFont('fixed') = '(null)' height 32 [0] > So I did not get a 36 font but the fixed font. Do you have any suggestions > how to get a font to work? This is likely that a fonts.alias or other file required to translate the fonts specified in FLTK 1.3 and sent to NXLIB can be found in NXLIB's font directories. This is complicated, but you will need fonts.dir, fonts.alias, and possibly other files that will allow truetype fonts to be selected, so that the large size can be created. A workaround would be to build an alias for a fixed-size 36 font, which would be found with the variable sized XLFD font spec. Regards, Greg | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Subject:
Re: [nanogui] FLTK keyboard question
From: "Georg Potthast" ####@####.#### Date: 27 Jun 2011 18:30:06 -0000 Message-Id: <006701cc34f8$3c655770$6800a8c0@SCHREIBTISCHGP> Hi Greg, to answer some of your questions: the versions up to FLTK 1.1.10 did not display text at the correct size, just the small system font size. With FLTK 1.3.0 it is no text at all. You can see from the NXLIB messages that FLTK 1.1.10 does query for further fonts after "findfont_nowild: fail" while FLTK 1.3.0 does not. I always use my kbd_dj driver which works fine exept for FLTK. I doubt that ttyscan will work at all since I assume that only works with Linux. I would have to try if DJGPP has tty devices. Could the message: nxTranslateEventMask no handler for event mask (0022c07f): 14 relate to the keyboard problem or what does it mean? The fonts.dir file in the fonts/freetype directory just contains a single zero. I downloaded that from your FTP site. Regards Georg | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Subject:
Re: [nanogui] FLTK keyboard question
From: "Georg Potthast" ####@####.#### Date: 30 Jun 2011 22:33:10 -0000 Message-Id: <001d01cc35c3$47580f30$6800a8c0@SCHREIBTISCHGP> I found that my kbd_dj driver had a bug and returned the wrong scancode value. Now I can make keyboard input with FLTK version 1.1.10. However, since FLTK uses the scancode, I only have a US keyboard layout. I have to see if this can be configured in FLTK. With version 1.3.0 I cannot tell if the keyboard works, since there is no text displayed on the screen, even the cursor is not present. Where can I get a populated fonts.dir file? Georg | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Subject:
Re: [nanogui] FLTK keyboard question
From: "Greg Haerr" ####@####.#### Date: 7 Jul 2011 19:27:15 -0000 Message-Id: <2D1BAD98367E4C67BA259137FE305178@winXP> : Where can I get a populated fonts.dir file? The Linux command "mkfontdir" builds fonts.dir files from font directories. Grep the net for directions. The NXLIB fonts.alias and fonts.dir files exactly match the capabilities found in modern Linux distributions. Regards, Greg | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Subject:
Re: [nanogui] FLTK keyboard question
From: "Greg Haerr" ####@####.#### Date: 7 Jul 2011 19:31:23 -0000 Message-Id: <D9DCB310C9C64C008C62F426ED8EDB29@winXP> : The fonts.dir file in the fonts/freetype directory just contains a single : zero. I downloaded that from your FTP site. I'll add sample fonts.dir and fonts.alias files to the NXLIB distribution with instructions. This was left out because we're not including fonts at this time, but I'll point them towards the microwindows fonts directory samples. Regards, Greg | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
[<<] [<] Page 1 of 2 [>] [>>] |