* Re: [Qemu-devel] Keyboard problem in qemu 0.6.0-2
2004-09-04 1:07 ` Kim Adil
@ 2004-09-03 11:54 ` Mark Williamson
2004-09-04 2:07 ` Kim Adil
0 siblings, 1 reply; 19+ messages in thread
From: Mark Williamson @ 2004-09-03 11:54 UTC (permalink / raw)
To: qemu-devel
What keyboard map are you using? AFAIK, if you are using a keymap that is
different to the *guest* OS default, you need to set up a new keymap in the
guest as well.
i.e. running Dvorak on my host system, guest OSs still assumed that I had a
qwerty keyboard and would need explicit configuration to also use the Dvorak
layout.
HTH,
Mark
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [Qemu-devel] Keyboard problem in qemu 0.6.0-2
2004-09-04 2:07 ` Kim Adil
@ 2004-09-03 12:28 ` Mark Williamson
2004-09-04 2:34 ` Kim Adil
0 siblings, 1 reply; 19+ messages in thread
From: Mark Williamson @ 2004-09-03 12:28 UTC (permalink / raw)
To: qemu-devel
Basically what I meant was: what kind of keyboard are you using in the host
OS? Is it a standard Qwerty keyboard (i.e. the top row of the keyboard is
QWERTYUIOP), or some different layout? What keyboard layout does the guest
seem to be seeing (if you can tell)?
HTH,
Mark
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [Qemu-devel] Keyboard problem in qemu 0.6.0-2
2004-09-04 4:26 ` Kim Adil
@ 2004-09-03 17:13 ` Bochnig, Martin
2004-09-03 17:33 ` Bochnig, Martin
2004-09-04 1:53 ` Kim Adil
0 siblings, 2 replies; 19+ messages in thread
From: Bochnig, Martin @ 2004-09-03 17:13 UTC (permalink / raw)
To: qemu-devel
Kim Adil wrote:
> I seem to have a default keymap to the french keyboard layout. I thought
> it must be defined in the guest os images that I downloaded, however, I
> tried booting a windows XP setup disk and the same key layout was
> experienced. Is there a way to alter this?
Hi,
I have similar problems with a Solaris10_x86 host running QEMU 0.6.0
when displaying to the default Xsun X-Server at ':0.0' or forwarding to
my SPARC machines running several Solaris versions.
These problems make QEMU (any Guest OS's command line, any input fields)
completely unusable.
Almost exactly the same DISmapping appeared, when running the prebuilt
0.6.0 LinUX binary on the JDS1_Live Demo CD (while the mapping itself
was different).
Since no one else complained about it, my HOST and my machines
displaying QEMU's window over the network appeared to be the cause.
Both the physical Keyboards itself (different vendors, different
interfaces [ps/2 and usb]) as well as all guest and host OS's use
US-English / POSIX C 7bit as default locale.
I had the same problem at University when running 0.6.0 on a Debian
system installed in 2001.
On most of these systems
"qwertyui"
is interpreted by the guest as
"rp6tu]i0".
Many keys do nothing at all. Others give strange control seqences with
their ascii hex id printed to the guest console.
I posted to the ml around a week ago but didn't get reports of others
confirming my experiences.
Am I the only one worldwide (your problem description still sounds quite
moderate, as your keys are still in a usual sequential order - just
shifted by a few keys) ?
WORKAROUND: First ensure that you have installed the very latest SDL
release (unfortunately doing so didn't solve above problems in any way -
however).
***The solution was to upgrade the HOST to the latest XFree86 4.x (that
is to replace Xsun)***
***Alternatively it may help to use VNC4.x (which actually uses/includes
a minimal - XFree86 4.x server)***.
So the misbehavior seems to be Host-X11_Server dependent.
The key mappings between SDL<<--->>X11 seem to be the root of these errors.
A bug in qemu, as it doesn's support forwarding to proprietary or even
free X11 servers, when too old.
(maybe an XFree86_4.x--only specific option not supported by anything else?)
Another alternative is: Go to http://www.dad-answers.com/qemu , download
the NOsdl-patch, copy 'nosdl.c' over 'sdl.c' , type
"make distclean;./configure;make" then switch user to root and do a make
install.
Worked for me.
--
Martin
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [Qemu-devel] Keyboard problem in qemu 0.6.0-2
2004-09-03 17:13 ` Bochnig, Martin
@ 2004-09-03 17:33 ` Bochnig, Martin
2004-09-04 1:53 ` Kim Adil
1 sibling, 0 replies; 19+ messages in thread
From: Bochnig, Martin @ 2004-09-03 17:33 UTC (permalink / raw)
To: qemu-devel
Bochnig, Martin wrote:
> A bug in qemu, as it doesn's support forwarding to proprietary or even
> free X11 servers, when too old.
> (maybe an XFree86_4.x--only specific option not supported by anything
> else?)
Or a bug in SDL rather than in QEMU?
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [Qemu-devel] Keyboard problem in qemu 0.6.0-2
@ 2004-09-03 17:38 Juergen Keil
2004-09-03 20:06 ` Bochnig, Martin
2004-09-03 20:44 ` Fabrice Bellard
0 siblings, 2 replies; 19+ messages in thread
From: Juergen Keil @ 2004-09-03 17:38 UTC (permalink / raw)
To: qemu-devel
> I have similar problems with a Solaris10_x86 host running QEMU 0.6.0
> when displaying to the default Xsun X-Server at ':0.0' or forwarding to
> my SPARC machines running several Solaris versions.
>
> These problems make QEMU (any Guest OS's command line, any input fields)
> completely unusable.
Yep, I noticed that problem, too. On a Solaris9_x86 host / Xsun.
The root cause is probably the sdl.c:sdl_keyevent_to_keycode() subroutine
that assumes X11 keycodes can be converted to PC scancodes by substracting
8 from the X11 keycode (for keycodes in the range 8..96):
static uint8_t sdl_keyevent_to_keycode(const SDL_KeyboardEvent *ev)
{
int keycode;
keycode = ev->keysym.scancode;
if (keycode < 9) {
keycode = 0;
} else if (keycode < 97) {
keycode -= 8; /* just an offset */
} else if (keycode < 158) {
/* use conversion table */
keycode = x_keycode_to_pc_keycode[keycode - 97];
} else {
keycode = 0;
}
return keycode;
}
I guess that (``scancode = keycode - 8'') only works with an XFree86 X11
server.
My current workaround is to compile sdl.c with CONFIG_SDL_GENERIC_KBD
defined. This enables a more accurate X11 keysym to PC scancode translation
table. Problem is, the translation table assumes a US keyboard layout.
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [Qemu-devel] Keyboard problem in qemu 0.6.0-2
2004-09-03 17:38 [Qemu-devel] Keyboard problem in qemu 0.6.0-2 Juergen Keil
@ 2004-09-03 20:06 ` Bochnig, Martin
2004-09-03 20:22 ` Bochnig, Martin
2004-09-03 20:44 ` Fabrice Bellard
1 sibling, 1 reply; 19+ messages in thread
From: Bochnig, Martin @ 2004-09-03 20:06 UTC (permalink / raw)
To: qemu-devel
Juergen,
hey, great: I knew you would have the detailed answer :)
You make Sol_x86 user's life easier!
I use your audio drivers (the old 137x as well as the newer audioemu
ones) for three years now.
> Yep, I noticed that problem, too. On a Solaris9_x86 host / Xsun.
Solaris*9* host? But how did you manage to get around these symbol
resolution errors related to 'fesetround', 'lrint' and 'llrint'?
Simply copying over the required libraries from Solaris10:/lib/[required
libs] to /lib didn't solve the problem.
Do I have to modify ld's database or something like that?
Thank you,
Martin
> Yep, I noticed that problem, too. On a Solaris9_x86 host / Xsun.
>
>
> The root cause is probably the sdl.c:sdl_keyevent_to_keycode() subroutine
> that assumes X11 keycodes can be converted to PC scancodes by substracting
> 8 from the X11 keycode (for keycodes in the range 8..96):
>
>
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [Qemu-devel] Keyboard problem in qemu 0.6.0-2
2004-09-03 20:06 ` Bochnig, Martin
@ 2004-09-03 20:22 ` Bochnig, Martin
0 siblings, 0 replies; 19+ messages in thread
From: Bochnig, Martin @ 2004-09-03 20:22 UTC (permalink / raw)
To: bochnig, qemu-devel
Bochnig, Martin wrote:
> You make Sol_x86 user's life easier!
Solaris user's to be correct.
He offers drivers for both SPARC and x86 platforms.
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [Qemu-devel] Keyboard problem in qemu 0.6.0-2
2004-09-03 17:38 [Qemu-devel] Keyboard problem in qemu 0.6.0-2 Juergen Keil
2004-09-03 20:06 ` Bochnig, Martin
@ 2004-09-03 20:44 ` Fabrice Bellard
2004-09-06 14:16 ` Johannes Schindelin
2004-09-07 13:27 ` Johannes Schindelin
1 sibling, 2 replies; 19+ messages in thread
From: Fabrice Bellard @ 2004-09-03 20:44 UTC (permalink / raw)
To: Juergen Keil, qemu-devel
I'll try to merge parts of the VNC patch to solve the problem (rdesktop
keyboard mappings support).
Fabrice.
Juergen Keil wrote:
>
>>I have similar problems with a Solaris10_x86 host running QEMU 0.6.0
>>when displaying to the default Xsun X-Server at ':0.0' or forwarding to
>>my SPARC machines running several Solaris versions.
>>
>>These problems make QEMU (any Guest OS's command line, any input fields)
>>completely unusable.
>
>
> Yep, I noticed that problem, too. On a Solaris9_x86 host / Xsun.
>
>
> The root cause is probably the sdl.c:sdl_keyevent_to_keycode() subroutine
> that assumes X11 keycodes can be converted to PC scancodes by substracting
> 8 from the X11 keycode (for keycodes in the range 8..96):
>
>
> static uint8_t sdl_keyevent_to_keycode(const SDL_KeyboardEvent *ev)
> {
> int keycode;
>
> keycode = ev->keysym.scancode;
>
> if (keycode < 9) {
> keycode = 0;
> } else if (keycode < 97) {
> keycode -= 8; /* just an offset */
> } else if (keycode < 158) {
> /* use conversion table */
> keycode = x_keycode_to_pc_keycode[keycode - 97];
> } else {
> keycode = 0;
> }
> return keycode;
> }
>
>
> I guess that (``scancode = keycode - 8'') only works with an XFree86 X11
> server.
>
>
> My current workaround is to compile sdl.c with CONFIG_SDL_GENERIC_KBD
> defined. This enables a more accurate X11 keysym to PC scancode translation
> table. Problem is, the translation table assumes a US keyboard layout.
>
>
>
> _______________________________________________
> Qemu-devel mailing list
> Qemu-devel@nongnu.org
> http://lists.nongnu.org/mailman/listinfo/qemu-devel
>
>
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [Qemu-devel] Keyboard problem in qemu 0.6.0-2
[not found] <200409032051.i83KpOLj027201@tiger2.tools.intra>
@ 2004-09-03 21:11 ` Bochnig, Martin
0 siblings, 0 replies; 19+ messages in thread
From: Bochnig, Martin @ 2004-09-03 21:11 UTC (permalink / raw)
To: qemu-devel
Juergen Keil wrote:
> I use the same macros that are already used for the xxxBSDs, for example
> in dyngen-exec.h:
Yes - I know, (at least some)BSD's libc does not support these symbols.
I tried to use QEMU's *BSD code for a certain while, too.
But without your modifications below, it didn't work and I got a lot of
trouble and I then discarded my idea (due to my success under Solaris10).
Thanks a lot!
Martin
>
> -#if defined(_BSD) && !defined(__APPLE__)
> +#if defined(_BSD) && !defined(__APPLE__) || defined(_SVR4)
> #include <ieeefp.h>
>
> #define FE_TONEAREST FP_RN
> #define FE_DOWNWARD FP_RM
> #define FE_UPWARD FP_RP
> #define FE_TOWARDZERO FP_RZ
> #define fesetround(x) fpsetround(x)
> +#define fegetround() fpgetround()
> #else
> #include <fenv.h>
> #endif
>
> #ifdef __i386__
> #define AREG0 "ebp"
>
>
> Or in target-i386/exec.h
>
> -#if !defined(_BSD)
> +#if !defined(_BSD) && !defined(_SVR4)
> extern int lrint(CPU86_LDouble x);
> extern int64_t llrint(CPU86_LDouble x);
> #else
> #define lrint(d) ((int)rint(d))
> #define llrint(d) ((int)rint(d))
> #endif
>
>
>
>
^ permalink raw reply [flat|nested] 19+ messages in thread
* [Qemu-devel] Keyboard problem in qemu 0.6.0-2
@ 2004-09-04 1:07 ` Kim Adil
2004-09-03 11:54 ` Mark Williamson
0 siblings, 1 reply; 19+ messages in thread
From: Kim Adil @ 2004-09-04 1:07 UTC (permalink / raw)
To: qemu-devel
I am using a knoppix-2-hd install and used "apt-get install" to load
qemu. Everything starts up well but for some reason my keys seem to be
mapped to the wrong characters in the qemu session. Any ideas?
Kim
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [Qemu-devel] Keyboard problem in qemu 0.6.0-2
2004-09-03 17:13 ` Bochnig, Martin
2004-09-03 17:33 ` Bochnig, Martin
@ 2004-09-04 1:53 ` Kim Adil
2004-09-04 7:18 ` Bochnig, Martin
1 sibling, 1 reply; 19+ messages in thread
From: Kim Adil @ 2004-09-04 1:53 UTC (permalink / raw)
To: bochnig, qemu-devel
Thanks Martin, it worked perfectly.
Kim
Bochnig, Martin wrote:
>
> Another alternative is: Go to http://www.dad-answers.com/qemu ,
> download the NOsdl-patch, copy 'nosdl.c' over 'sdl.c' , type
> "make distclean;./configure;make" then switch user to root and do a
> make install.
>
> Worked for me.
>
>
> --
>
> Martin
> vel
>
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [Qemu-devel] Keyboard problem in qemu 0.6.0-2
2004-09-03 11:54 ` Mark Williamson
@ 2004-09-04 2:07 ` Kim Adil
2004-09-03 12:28 ` Mark Williamson
0 siblings, 1 reply; 19+ messages in thread
From: Kim Adil @ 2004-09-04 2:07 UTC (permalink / raw)
To: qemu-devel
Please excuse my ignorance but how can I tell?
Mark Williamson wrote:
>What keyboard map are you using?
>
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [Qemu-devel] Keyboard problem in qemu 0.6.0-2
2004-09-03 12:28 ` Mark Williamson
@ 2004-09-04 2:34 ` Kim Adil
2004-09-04 2:38 ` Kim Adil
0 siblings, 1 reply; 19+ messages in thread
From: Kim Adil @ 2004-09-04 2:34 UTC (permalink / raw)
To: qemu-devel
It is a standard QWERTY keyboard. XF86Config has it listed as
XkbModel "pc105"
XkbLayout "us"
Kim
Mark Williamson wrote:
>Basically what I meant was: what kind of keyboard are you using in the host
>OS? Is it a standard Qwerty keyboard (i.e. the top row of the keyboard is
>QWERTYUIOP), or some different layout? What keyboard layout does the guest
>seem to be seeing (if you can tell)?
>
>HTH,
>Mark
>
>
>
>_______________________________________________
>Qemu-devel mailing list
>Qemu-devel@nongnu.org
>http://lists.nongnu.org/mailman/listinfo/qemu-devel
>
>
>
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [Qemu-devel] Keyboard problem in qemu 0.6.0-2
2004-09-04 2:34 ` Kim Adil
@ 2004-09-04 2:38 ` Kim Adil
2004-09-04 4:26 ` Kim Adil
0 siblings, 1 reply; 19+ messages in thread
From: Kim Adil @ 2004-09-04 2:38 UTC (permalink / raw)
To: qemu-devel
If I type the:
qwertyui
keys, then"
7890-qwyb
appears on the screenwith bothe the freedos image and the linux-test image
Kim
Kim Adil wrote:
> It is a standard QWERTY keyboard. XF86Config has it listed as
> XkbModel "pc105"
> XkbLayout "us"
>
> Kim
>
> Mark Williamson wrote:
>
>> Basically what I meant was: what kind of keyboard are you using in
>> the host OS? Is it a standard Qwerty keyboard (i.e. the top row of
>> the keyboard is QWERTYUIOP), or some different layout? What keyboard
>> layout does the guest seem to be seeing (if you can tell)?
>>
>> HTH,
>> Mark
>>
>>
>>
>> _______________________________________________
>> Qemu-devel mailing list
>> Qemu-devel@nongnu.org
>> http://lists.nongnu.org/mailman/listinfo/qemu-devel
>>
>>
>>
>
>
>
> _______________________________________________
> Qemu-devel mailing list
> Qemu-devel@nongnu.org
> http://lists.nongnu.org/mailman/listinfo/qemu-devel
>
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [Qemu-devel] Keyboard problem in qemu 0.6.0-2
2004-09-04 2:38 ` Kim Adil
@ 2004-09-04 4:26 ` Kim Adil
2004-09-03 17:13 ` Bochnig, Martin
0 siblings, 1 reply; 19+ messages in thread
From: Kim Adil @ 2004-09-04 4:26 UTC (permalink / raw)
To: qemu-devel
I seem to have a default keymap to the french keyboard layout. I thought
it must be defined in the guest os images that I downloaded, however, I
tried booting a windows XP setup disk and the same key layout was
experienced. Is there a way to alter this?
Kim
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [Qemu-devel] Keyboard problem in qemu 0.6.0-2
2004-09-04 1:53 ` Kim Adil
@ 2004-09-04 7:18 ` Bochnig, Martin
2004-09-04 7:55 ` Bochnig, Martin
0 siblings, 1 reply; 19+ messages in thread
From: Bochnig, Martin @ 2004-09-04 7:18 UTC (permalink / raw)
To: qemu-devel
Kim Adil wrote:
> Thanks Martin, it worked perfectly.
>
> Kim
Hi,
I'm glad to hear that I could help you.
However - sdl does have its advantages: Ctr+Shift+f switches forth and
back to and from fullscreen mode operation;
(and of course it makes QEMU as well as other projects using it ways
more host platform independent as it doesn't require the presence of X).
In my eyes Juergen's approach is a much cleaner solution:
> I guess that (``scancode = keycode - 8'') only works with an XFree86 X11
> server.
>
>
> My current workaround is to compile sdl.c with CONFIG_SDL_GENERIC_KBD
> defined. This enables a more accurate X11 keysym to PC scancode translation
> table. Problem is, the translation table assumes a US keyboard layout.
>
>
Having installed both qemu_using_X11 and qemu_using_SDL at the same time
would be possible too (ie to /usr/local and /opt or /usr).
Regards,
Martin
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [Qemu-devel] Keyboard problem in qemu 0.6.0-2
2004-09-04 7:18 ` Bochnig, Martin
@ 2004-09-04 7:55 ` Bochnig, Martin
0 siblings, 0 replies; 19+ messages in thread
From: Bochnig, Martin @ 2004-09-04 7:55 UTC (permalink / raw)
To: qemu-devel
Bochnig, Martin wrote:
> Kim Adil wrote:
>
>> Thanks Martin, it worked perfectly.
>>
>> Kim
>
Kim,
simply delete or comment out the two lines surrounding
CONFIG_SDL_GENERIC_KBD ' s definition (lines #32 and#34 in my case) in
QEMU's original sdl.c, so that it is processed in any case:
// #if defined(__APPLE__)
#define CONFIG_SDL_GENERIC_KBD
// #endif
Works perfectly - thanks to Juergen's hint.
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [Qemu-devel] Keyboard problem in qemu 0.6.0-2
2004-09-03 20:44 ` Fabrice Bellard
@ 2004-09-06 14:16 ` Johannes Schindelin
2004-09-07 13:27 ` Johannes Schindelin
1 sibling, 0 replies; 19+ messages in thread
From: Johannes Schindelin @ 2004-09-06 14:16 UTC (permalink / raw)
To: qemu-devel
Hi,
On Fri, 3 Sep 2004, Fabrice Bellard wrote:
> I'll try to merge parts of the VNC patch to solve the problem (rdesktop
> keyboard mappings support).
Unfortunately, a few important keys don't work yet (Cursor keys, Delete,
AltGr, ...). I did not fix it yet because my priority was VNC. I will try
that now.
Now, another question (Hi Fabrice): As the keymaps of rdesktop use the
XKeysym names, I had to generate a mapping from XKeysym names to SDL
keycodes. In order to do that, I created a little shell script which tries
to convert as much as possible automatically from the file SDL_keysym.h,
because the constants defined there resemble closely the Xkeysym names.
Is this the preferred way, or should I create a header
(Xkeysym2SDLkeysym.h) once and for all?
Ciao,
Dscho
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [Qemu-devel] Keyboard problem in qemu 0.6.0-2
2004-09-03 20:44 ` Fabrice Bellard
2004-09-06 14:16 ` Johannes Schindelin
@ 2004-09-07 13:27 ` Johannes Schindelin
1 sibling, 0 replies; 19+ messages in thread
From: Johannes Schindelin @ 2004-09-07 13:27 UTC (permalink / raw)
To: qemu-devel
[-- Attachment #1: Type: TEXT/PLAIN, Size: 355 bytes --]
Hi,
attached is a cut down version of my rfb patch. It now only contains
changes necessary to interpret rdesktop's keymaps. After applying ("cd
qemu; make distclean; gunzip < attached.patch | patch -p1; ./configure;
make") you can specify your keyboard layout via "-k":
qemu -k de
or
qemu -k fr
Any comments, suggestions, etc. welcome.
Ciao,
Dscho
[-- Attachment #2: Type: APPLICATION/x-gunzip, Size: 15940 bytes --]
^ permalink raw reply [flat|nested] 19+ messages in thread
end of thread, other threads:[~2004-09-07 13:33 UTC | newest]
Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-09-03 17:38 [Qemu-devel] Keyboard problem in qemu 0.6.0-2 Juergen Keil
2004-09-03 20:06 ` Bochnig, Martin
2004-09-03 20:22 ` Bochnig, Martin
2004-09-03 20:44 ` Fabrice Bellard
2004-09-06 14:16 ` Johannes Schindelin
2004-09-07 13:27 ` Johannes Schindelin
[not found] <200409032051.i83KpOLj027201@tiger2.tools.intra>
2004-09-03 21:11 ` Bochnig, Martin
[not found] <ksadil@bigpond.net.au>
2004-09-04 1:07 ` Kim Adil
2004-09-03 11:54 ` Mark Williamson
2004-09-04 2:07 ` Kim Adil
2004-09-03 12:28 ` Mark Williamson
2004-09-04 2:34 ` Kim Adil
2004-09-04 2:38 ` Kim Adil
2004-09-04 4:26 ` Kim Adil
2004-09-03 17:13 ` Bochnig, Martin
2004-09-03 17:33 ` Bochnig, Martin
2004-09-04 1:53 ` Kim Adil
2004-09-04 7:18 ` Bochnig, Martin
2004-09-04 7:55 ` Bochnig, Martin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).