Hi,
> Well, I described how it worked on mechanical typewriters; just having
> a ShiftLock is enough. (OTOH it is a long time since I last used
> a mechanical typewriter, and since I discovered the CapsLock on
> computers (allowing to have uppercase of ccedilla for example), I like
> this better. On typewritters the "Shift Lock" was useful to type
> lots of numbers (on French and Belgian keyboars, digits are on second
> shift position); but on computers there is the numeric keyopad...)
Well, I can make an option (what about "caps:lockshift" name) that shifts
ALL keys but it can't be canceled with Shift key pressing.
> > Probably ConvertCase procedure doesn't know how to convert it to uppercase.
>
> Where is the list of internal case pairs ?
There is XConvertCase subroutine in xc/lib/X11/KeyBind.c but deals with keysym
ranges and you need to figure out falls a paticular keysym into some range
or not.
> > I wrote a test program that prints keysyms for all keys in a map for all
> > combinations of Lock and Shift. And than I ran it for all layouts in both
> > modes and compared the results.
> > There are few differences (in 'tr' for example) and in all cases caps:shift
> > produces more reasonable result.
>
> Could I get that program somewhere?
It's a very simple program (I attached it). It just prints all keysyms of the
current keyboard map. Therefore I ran it from a batch file like
setxkbmap al
maptest > al.map
setxkbmap be
maptest > be.map
...
and then compare files with 'diff'.
> So, if that is the only reason not to make "caps:shift" the default, then
> it may be dismissed. (and the Canadian keyboard map should be fixed to
> have either [ eth, ETH ] or [ eth, dstroke ] )
OK.
> Mmmh; I don't see any difference in behaviour at all between caps:shift
> and caps:internal !
Even for 'tr' and 'az' keyboard ?!
('az' uses the same idotles/I and i/Iabovedot pairs as 'tr')
Also I found a difference for [oe, OE] key in 'fr-latin9' map. But it rater
a bug in XConvertCase and I think it's already fixed in the current sources
(I tested it under 4.3.0).
> But I see a difference between old (in ..../xkb/ ) and new (in .../xkb/pc/ )
> keymaps.
> Old ones behave as in your description of caps:internal; new ones
> behaves as in your description of caps:shift
>
> I tested with [ a, Greek_OMEGA ], when the keyboard is listed as old
> one; then CapsLock gives "A"; when it is listed as new layout, then
> CapsLock gives "Greek_OMEGA".
Hmm. Don't know. Can you tell about all conditions?
What caps mode you tested with? What keymap do you mean? There is not such
key in existent maps. Did you write it yourself? If so, don't you forget
to copy the file into both directories (xkb/symbols for old layouts and
xkb/symbols/pc for new ones)?
In my tests (a wrote such key description myself) it always is recognized
as 'two level' (it seems like a bug in xkbcomp; probaly it doesn't recognizes
Greek keysyms as letters at all) and always gives 'A'.
> (So, the solution for the Turkish keyboard problems would be to use
> only new layout ones; it solves my problem, but I wonder how I don't
> see any difference when using -option "caps:shift" or -option "caps:internal")
BTW. Do you know that xkbcomp 'summarizes' new options with already set ones?
If you run it once as "setxkbmap <layout> -option caps:shift", to replace
the mode you have to run it second time as
setxkbmap <layout> -option "" -option caps:shift
--
Ivan U. Pascal | e-mail: [EMAIL PROTECTED]
Administrator of | Tomsk State University
University Network | Tomsk, Russia
#include <X11/Xlib.h>
#include <X11/Xlibint.h>
XKeyEvent ev;
Display *dpy;
main(argc, argv)
int argc;
char **argv;
{
KeyCode keycode;
KeySym keysym;
int GroupMask, max, min;
dpy = XOpenDisplay(0);
if(!dpy) { printf("Can't open display\n"); exit(0);};
ev.type = KeyPress;
ev.display = dpy;
ev.state = 0;
ev.keycode = 0;
XDisplayKeycodes(dpy, &min, &max);
for(keycode = min; keycode < max; keycode++) {
ev.keycode = keycode;
printf ("%3d : ", keycode);
ev.state = 0;
XLookupString(&ev, NULL, 0, &keysym, NULL);
printf ("%s ", XKeysymToString(keysym));
ev.state = ShiftMask;
XLookupString(&ev, NULL, 0, &keysym, NULL);
printf ("%s ", XKeysymToString(keysym));
ev.state = LockMask;
XLookupString(&ev, NULL, 0, &keysym, NULL);
printf ("%s ", XKeysymToString(keysym));
ev.state = ShiftMask | LockMask;
XLookupString(&ev, NULL, 0, &keysym, NULL);
printf ("%s ", XKeysymToString(keysym));
/* New layouts */
GroupMask = Mod5Mask;
/* Old layouts*/
/* GroupMask = 1<<13; */
ev.state = GroupMask;
XLookupString(&ev, NULL, 0, &keysym, NULL);
printf ("%s ", XKeysymToString(keysym));
ev.state = GroupMask | ShiftMask;
XLookupString(&ev, NULL, 0, &keysym, NULL);
printf ("%s ", XKeysymToString(keysym));
ev.state = GroupMask | LockMask;
XLookupString(&ev, NULL, 0, &keysym, NULL);
printf ("%s ", XKeysymToString(keysym));
ev.state = GroupMask | ShiftMask | LockMask;
XLookupString(&ev, NULL, 0, &keysym, NULL);
printf ("%s ", XKeysymToString(keysym));
printf("\n");
}
XCloseDisplay(dpy);
}
DEPLIBS = $(DEPXONLYLIB)
LOCAL_LIBRARIES = $(XONLYLIB)
all:: mapest
NormalProgramTarget(maptest,maptest.o,$(DEPLIBS),$(LOCAL_LIBRARIES),)