updated -sdl-modifiers patch
Hi,
I've updated my sdl-modifiers patch to work with qemu cvs. Some of my changes have been incorporated into qemu cvs (sticky control key), so they are no longer part of my patch.
When you use the -sdl-modifiers command line switch of qemu after applying my patch, qemu will take care of handling CAPS and NUM lock for the OS in a way that's consistent with the host OS behaviour of modifier keys. So host and guest won't disagree on whether caps lock is up or down any more. In some cases this could lead to a crash (happened to me in OS/2).
The old version of this patch is on dad-answers already and should be updated (SDL_keyboard_fix).
Johannes
Quoted 5 lines · Johannes Martin
Hi,
I've updated my sdl-modifiers patch to work with qemu cvs. Some of my changes have been incorporated into qemu cvs (sticky control key), so they are no longer part of my patch.
When you use the -sdl-modifiers command line switch of qemu after applying my patch, qemu will take care of handling CAPS and NUM lock for the OS in a way that's consistent with the host OS behaviour of modifier keys. So host and guest won't disagree on whether caps lock is up or down any more. In some cases this could lead to a crash (happened to me in OS/2).
This seems to work for me. Or at least, no immediate problems. I have XKB ctrl:swapcaps option set on my host, and the guest OS often would get a stuck caps-lock (caps-lock in guest, ctrl in host). With 0.6.0 I could usually clear it with enough pressing of ctrl/shift/caps-lock (see below), but I could not seem to clear it with CVS from earlier this week + this patch + IDE patches, meaning i would have to hold 'Caps Lock' (unstick, ctrl in host, caps-lock in guest) to get lower case.
I've tried to break it with this patch, grabbing and ungrabbing SDL, exiting it with sticky key (ie caps-lock LED indicated) on, setting it off outside of the qemu window and then entering it again, etc.. and I havnt yet gotten it confused. So looks hopeful.
Another note: The guest OS doesnt seem to get the translated (ie swapped caps/ctrl) codes, it thinks caps-lock is still caps-lock and ctrl ctrl - with one difference, the "stickyness" *is* reversed: ie when i press 'Caps Lock' /marked/ key, in the host it is a non-sticky ctrl, in the guest it behaves as a non-sticky (I need to keep it held down, ie its a bit like a shift key) caps-lock, similarly if i press the key marked 'control', i get a sticky caps-lock on the host (and caps-lock LED goes on) and the guest OS sees a sticky ctrl key.
I dont know if it would be possible to be able to take XKB ctrl:swapcaps into account, it would be /really/ nice if we could.
Quoted 1 line
Johannes
regards,
Signature · 5 lines
Paul Jakma [email protected] [email protected] Key ID: 64A2FF6A Fortune: "Why are we importing all these highbrow plays like `Amadeus'? I could have told you Mozart was a jerk for nothing." -- Ian Shoales
Quoted 1 line · Paul Jakma
This seems to work for me.
Spoke too soon. I just got it to 'stick' wrong. Ie caps-lock held, though caps-lock was off. The old "press shift, then press control" trick worked though.
regards,
Signature · 3 lines
Paul Jakma [email protected] [email protected] Key ID: 64A2FF6A Fortune: Many are cold, but few are frozen.
Quoted 1 line · Paul Jakma
Spoke too soon. I just got it to 'stick' wrong. Ie caps-lock held, though caps-lock was off. The old "press shift, then press control" trick worked though.
Disregard: I forgot that the patch adds a command line argument, without which it is not enabled.
Will report again once I've used it with the cl arg a while.
Quoted 2 lines
regards,
Signature · 4 lines
Paul Jakma [email protected] [email protected] Key ID: 64A2FF6A Fortune: It isn't easy being the parent of a six-year-old. However, it's a pretty small price to pay for having somebody around the house who understands computers.
Quoted 7 lines · Paul Jakma
Quoted 1 line · Paul Jakma
Spoke too soon. I just got it to 'stick' wrong. Ie caps-lock held, though caps-lock was off. The old "press shift, then press control" trick worked though.
Disregard: I forgot that the patch adds a command line argument, without which it is not enabled.
Will report again once I've used it with the cl arg a while.
With -sdl-mod I've not had an occurance of stuck keys all day long, running 2 instances of Solaris on (2) Qemus.
Now if I could get a fix for XKB ctrl:swapcaps going wrong, then Qemu would be nearly perfect. ;)
regards,
Signature · 3 lines
Paul Jakma [email protected] [email protected] Key ID: 64A2FF6A Fortune: Is a person who blows up banks an econoclast?