[prev in list] [next in list] [prev in thread] [next in thread] 

List:       koffice
Subject:    Re: Kword and function keys
From:       Chris Osicki <chris () osk ! ch>
Date:       2003-05-06 19:23:54
[Download RAW message or body]

On Sun, May 04, 2003 at 10:14:12AM +0200, David Faure wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> On Sunday 04 May 2003 00:17, Chris Osicki wrote:
> > 
> > Hi,
> > 
> > I noticed a strange behavior of Kword in regard to how it interprets 
> > keyboard. It looks like its view of the keyboard differs from the
> > X-server's one.
> > I use on my PC a Sun keyboard which has "additional" function keys on
> > the left hand site. I can "xmodmap" them and I use them under X or KDE
> > (assigned some of them to functions in Sawfish or applications like 
> > Emacs). 
> > It looks like Kword has its own view of what a keycode should
> > translate to.
> I guess all Qt/KDE applications have that view though.
> 
> > In other words, it looks like it takes keycodes and does the
> > translation itself. 
> I don't think so, but I could be wrong.
> 

Well, I don't know what to say. I "xmodmap" those function keys giving
them names like SunCopy, SunCut etc. Those keysyms (SunCopy, SunCut)
are not my invention, they are predefined, XKeysymDB is the file,
IIRC.
No I see there is another keyboard definition in:
/usr/X11R6/lib/X11/xkb/symbols/sun/us
where SunCopy and F16 are used.
I see some applications refering to my SunCopy key as F16 (even if I
xmodmape'ed it to SunCopy and xev shows SunCopy) and it works.

> > So, X-server translates keycode 125 to keysym
> > 0x1005ff72, SunCopy, for Kword it is an undefined keystroke.
> Well, it obviously is :)
> Strangely enough, the code I got from Qt said
>     case Key_F16: // Copy key on Sun keyboards
>     case Key_F18:  // Paste key on Sun keyboards
>     case Key_F20:  // Cut key on Sun keyboards
> This looks quite strange though, it could easily conflict with other custom definitions
> for function keys.

On which keyboards? ;-) The only one I owned which had "additional"
function keys on the left hand side from a company which doesn't
deserve to be mentioned, was crap. Those keys were sending the same
keycodes as those on the top of the keyboard!!

> Can you uncomment the line at koffice/lib/kotext/kotextview.cc:280, adding << " key=" << e->key()
> to it, to see exactly what Qt receives?
> There's no Key_SunCopy though, that's for sure...
> 

I will try to do it, but I will be very busy in next few days...
Anyway, I think it's Qt, I couldn't find yet other application where I 
would be given possibility of assigning functions to function-keys, so
I couldn't check.
All non Qt applications works as expected with my Sun's function keys.

> Also, you could try "Configure shortcuts" and see what it says when
> you press the SunCopy key.

How do you think I discovered the problem? ;-) 
It notices the key-press but but it is just "None".

> 
> - -- 
> David Faure -- faure@kde.org, dfaure@klaralvdalens-datakonsult.se
> Qt/KDE/KOffice developer
> Klarälvdalens Datakonsult AB, Platform-independent software solutions
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.0.7 (GNU/Linux)
> 
> iD8DBQE+tMvU72KcVAmwbhARAj3iAJ9uaZO3ipdBfIJ7TTniLb2Y3Xc+fACdHnEb
> jZtNGcVZ+AgZsYKOH8QOyWQ=
> =THB9
> -----END PGP SIGNATURE-----
> 
> ____________________________________
> koffice mailing list
> koffice@mail.kde.org
> To unsubscribe please visit:
> http://mail.kde.org/mailman/listinfo/koffice

Regards,
Chris
____________________________________
koffice mailing list
koffice@mail.kde.org
To unsubscribe please visit:
http://mail.kde.org/mailman/listinfo/koffice
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic