|
Bugzilla – Full Text Bug Listing |
| Summary: | ncurses overload 'v' shortcut | ||
|---|---|---|---|
| Product: | [openSUSE] openSUSE 10.3 | Reporter: | Pavel Nemec <pnemec> |
| Component: | YaST2 | Assignee: | Katarina Machalkova <kmachalkova> |
| Status: | RESOLVED FIXED | QA Contact: | Jiri Srain <jsrain> |
| Severity: | Normal | ||
| Priority: | P5 - None | CC: | dickey, werner |
| Version: | Final | ||
| Target Milestone: | --- | ||
| Hardware: | Other | ||
| OS: | Other | ||
| Whiteboard: | |||
| Found By: | --- | Services Priority: | |
| Business Priority: | Blocker: | --- | |
| Marketing QA Status: | --- | IT Deployment: | --- |
| Attachments: | screenshot of ncurses yast image management | ||
You're probably using xterm, right? What you see as 'v' character is in fact down-arrow (ACS_DARROW in ncurses terminology), which is a hint for the user that this button (or text-field) is expandable - MenuButton or ComboBox. xterm for some reason does not display down-arrow as a real arrow but uses placeholder 'v' character instead. If you set TERM=linux or use urxvt terminal emulator (TERM=rxvt) you will see correct characters. I don't know why this is happening, if it is an error of xterm, font, or ncurses library, but it has certainly nothing to do with my code (because I want explicitly ACS_DARROW there and I'm not getting it anyway ;-) ). Investigating ... Hm... big letters on screen shot shows that I am using KDE Terminal which is Konsole. yakukae (embeded konsole) in this particular case. It use KDE fonts and all fonts are installed. konsole is very good in utf-8 and even with utf-16. So I will not expect problem here. I suggest use some solution which could be working on major number of term. As we spoke on irc something like " ..." or " []" could be better. It is also important to put space between word and character so instead of Filev you will get File v Adding sndirsch to Cc: as xterm does not seem to contain ACS_*ARROW characters in terminal description. But according to libncurses upstream maintainer, it's a feature, not a bug (although I don't quite understand his reasoning). Jfyi: this are the escape sequences xterm prints when displaying down arrow: Arrow Pointing DownESC[22;29Hv This is linux console (TERM=linux): ESC[0;10;11mESC[10mArrow Pointing DownESC[22;29HESC[0;10;11m^YESC[10m and urxvt (TERM=rxvt-unicode): ESC[0mESC(0ESC(BArrow Pointing DownESC[22;29HESC[0mESC(0BESC(B Let's ask Thomas. He knows more about xterm and ncurses :) Actually, I've already done so ;-) >> ncurses uses the terminal description for the narrow interface, arguably >> because even if it "knows" what the Unicode values are, the developer >> may intend a different mapping than ncurses' built-in table. > > But I don't intend to use different mapping ;-) For me, arrow characters are > significant e.g. in menus or combo-boxes. > So the only way how to make ncurses app display arrows in xterm is to link > against wide version of libncurses (ncursesw) and use corresponding WACS's ? Assuming that you're using a UTF-8 locale, that's the only way to make it work. right - that's what I do in dialog, e.g., #ifdef USE_WIDE_CURSES #define add_acs(win, code) wadd_wch(win, W ## code) #else #define add_acs(win, code) waddch(win, dlg_boxchar(code)) #endif Now using WACS instead of ACS arrows, as those map to [v,^,<,>] in xterm, but only in UTF-enabled locale. The change affects comboboxes and menu buttons (as arrow characters are significant in those, and placeholder characters may be most easily confused with real letters there) Fixed in y2-ncurses 2.16.18 (if it builds) |
Created attachment 195331 [details] screenshot of ncurses yast image management In Image management (Czech translation, bud valid also for en) all 'v' characters are marked as shortcut. see attached picture. 'v' shortcut is inactive though, and if you press alt+v nothing happened. It is quite confusing.