9 Apr 2006 02:09
[kde-edu]: KTouch - dead key bug
Andreas Nicolai <Andreas.Nicolai <at> gmx.net>
2006-04-09 00:09:36 GMT
2006-04-09 00:09:36 GMT
Hi folks, I have a problem here that I can't solve by myself. I got a report that KTouch doesn't handle dead keys properly. However, it seems to work on some systems, and on others it doesn't (it doesn't work on mine with KDE 3.4.2). So at first, if you have a second, could you maybe test whether this works on your computer and tell me which KDE version you use if it does? Secondly, I believe that somewhere in the Qt system there must be a way to tell the difference between the keypress event and the receiving of a completely composed key (after "adding in" the dead key). It makes sense to me that a keypress event blindly reports any key that is pressed, and as such also dead keys. But how can I get only the final key? Or, if I manually decompose dead keys and final keys, for instance I notice that the user presses ^ and then o I need to know that the final character is ô ... does anyone know an elegant way how to get that from ^ and o without adding X11 specific code? Finally, an important part of the functionality in KTouch is that keys to be pressed are highlighted. So for example, when the student is required to type a è, should I highlight the LEFT_SHIFT, the ` and the e at the same time or rather LEFT_SHIFT and ` and then e once I got the keypress event for ` ? Bye, Andreas
Albert
A Dimecres 12 Abril 2006 15:40, Andreas Nicolai va escriure:
> Hi there,
>
> I was trying to implement sound in KTouch yesterday and found myself
> cursing after hours of trying because the Arts KDE extension are not
> documented (not even a few lines of comments in the implementation files)
> and the code posted on the edu.kde.org page is outdated (doesn't compile
> anylonger) and is also slightly misleading (lifetime of objects to short to
> actually hear a sound).
>
> Anyway, if you want to have a somewhat more control when playing sounds
> (then just doing it n a fire-and-forget way), here's what you need to do:
>
> 1. create an KArtsDispatcher and KArtsServer object for the lifetime of
> your program (not like in the example, as soon as the dispatcher goes out
> of scope, that's it for the sound)
>
> 2. keep you playobject factory alive and monitor the status of your play
> objects
>
> 3. if you want to play the same sound (using the same playobject) again,
> you need to rewind it like via play_object->seek( poTime(0,0,0,"samples")
> );
Nice to have another version
RSS Feed