Received: from eggs.gnu.org ([2001:4830:134:3::10]:50517) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ux2SQ-0000Sa-5V for qemu-devel@nongnu.org; Wed, 10 Jul 2013 18:01:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Ux2SO-0005XH-Ky for qemu-devel@nongnu.org; Wed, 10 Jul 2013 18:01:54 -0400 References: <1373483000.8183.222@snotra> Mime-Version: 1.0 (1.0) In-Reply-To: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Message-Id: From: Alexander Graf Date: Thu, 11 Jul 2013 00:01:48 +0200 Subject: Re: [Qemu-devel] [Qemu-ppc] Mac OS X on QEMU List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Programmingkid Cc: Scott Wood , Stefan Hajnoczi , The OpenBIOS Mailinglist , "qemu-ppc@nongnu.org list:PowerPC" , qemu-devel qemu-devel Am 10.07.2013 um 21:54 schrieb Programmingkid : >=20 > On Jul 10, 2013, at 3:03 PM, Scott Wood wrote: >=20 >> On 07/09/2013 10:36:37 PM, Programmingkid wrote: >>> On Jul 9, 2013, at 1:32 PM, Scott Wood wrote: >>>> On 07/04/2013 09:58:04 AM, Programmingkid wrote: >>>>> On Jul 4, 2013, at 10:51 AM, Stefan Hajnoczi wrote: >>>>>> On Thu, Jul 4, 2013 at 4:45 PM, Alexander Graf wrote:= >>>>>>>=20 >>>>>>> On 04.07.2013, at 16:40, Programmingkid wrote: >>>>>>>=20 >>>>>>>> We have made a lot of progress in the last month with making Mac OS= X run in QEMU. A lot of people are to thank for this milestone. To everyone= involved, thank you. >>>>>>>>=20 >>>>>>>> There is one thing that we have to figure out. That is the command k= ey issue. This key is a very important on the Macintosh. It is used to send k= eyboard shortcuts to applications. >>>>>>>>=20 >>>>>>>> What I propose is adding a menu item to QEMU's menu called "Map Com= mand key to ALT". This would allow a user to be able to send Macintosh appli= cations command key shortcuts from both a PC and Mac keyboard. >>>>>>>>=20 >>>>>>>> I welcome any and all ideas to solve this problem. >>>>>>>=20 >>>>>>> This is the wrong mailing list for this. Your proposal would touch n= on-PPC code in QEMU, so this needs to go to qemu-devel. >>>>>>>=20 >>>>>>> Keep in mind that the same thing arises with x86 Mac OS X running in= QEMU. >>>>>>=20 >>>>>> When I VNC into a Mac I find that the "Windows key" becomes the >>>>>> Command key. And the same probably happens when you plug a non-Apple= >>>>>> USB keyboard into a Mac. >>>>> I was thinking about the Windows key. It would be the perfect substitu= te - if it was available on all keyboards. >>>>>>=20 >>>>>> If you are using a keyboard with a "Windows key" then that would be >>>>>> the most natural option. If you don't have that key then you really >>>>>> need to map something else... >>>>>>=20 >>>>>> Stefan >>>>> Maybe there should be two menu items: >>>>> "Map command key to ALT" and "Map command key to Windows key". >>>>> They would be mutually exclusive of course. >>>>=20 >>>> Isn't the Windows key already the same thing as the Command key, in ter= ms of the actual keycode generated? >>> I don't think so. The command key is equal to 0x37. The windows key is e= qual to 0x5B. This is my source: http://msdn.microsoft.com/en-us/library/win= dows/desktop/dd375731(v=3Dvs.85).aspx >>=20 >> That says 0x37 is the 7 key. The word "command" does not appear. >=20 > Sorry, but this is my source for a Mac keyboard:=20 > http://boredzo.org/blog/wp-content/uploads/2007/05/imtx-virtual-keycodes.p= ng.=20 >=20 > The values you see on the keys are in decimal. 55 in base 10 is equal to 3= 7 in base 16.=20 >=20 >>=20 >> It also looks like that table for something that Windows produces, not th= e raw output of the keyboard. >=20 > That could be the case. >=20 >>=20 >>>> And you'd still want to have an actual ALT key available... The option= should just be whether to swap the Command/Windows and ALT keys for better e= rgonomics. >>> That might not be true. The user might not mind giving up the alt or con= trol keys. The options and control key are not used very much on Mac OS X. >>=20 >> I assume you mean "The alt and control key are not used very much...". >>=20 >> Maybe the user doesn't mind -- but maybe they do mind and would rather sw= ap the two than end up with both ALT and the OS key being Command. When I u= sed MacOS X I use control and alt quite a bit, in console and X11 apps. >=20 > That's not a problem. The user would be free to decide which key acts as t= he command key. A function key could be used. The alt and control key can be= left alone. >=20 >>=20 >>> I also want to state that I decided against the adding menu items idea. I= nstead I am currently planning to use a command line option. You just pass t= he key value you want to use to act as the command key. Here's an example: >>> qemu-system-ppc -command-key 0x37. >>> The user could pick one of the functions keys as the command key if desi= red. >>=20 >> If you're going to get into remapping keys, wouldn't it be better to have= a generalized mechanism so the user could do whatever remaps they want? Ot= her targets may have their own special keys. >>=20 >> -Scott >=20 > That does sound like a good idea. There would be a lot of things we would h= ave to consider and agree upon. This is what I think you want, a command lin= e option that specifies a key what it maps to.=20 > Example: >=20 > qemu-system-ppc -a-key 0x0 -b-key 0x11 ...=20 >=20 > Basically you specify a key, then state the raw keyboard value for it. Is t= hat what you mean by generalized mechanism? This way could work, but I think= using a file might be better.=20 >=20 > Example: >=20 > file: keyboard-layout.txt > a 0x0 > b 0x11 > c 0x8 > command 0x37 > option 0x3A > control 0x3B > .... >=20 > qemu-system-ppc -keyboard-layout-file ./keyboard-layout.txt=20 That's exactly what -k does today already, no? Alex >=20 > There is one issue that still bothers me. Should we assume an ascii keyboa= rd is attached to the QEMU emulated machine? We might want to consider unico= de in the future. Not every user speaks english. Are there any non-native en= glish users who would like to see unicode support in QEMU?=20 >=20 >=20