[Vm-dev] Ctrl-M?

Michael Rueger m.rueger at acm.org
Fri Jun 19 14:48:43 UTC 2009

Michael Rueger wrote:

I also added VK_TAB to the meta keys to make ctrl-tab work.

I removed the inverse mapping from the mapVirtualKey function, as the 
numbers and pre-defined VK constants overlap and it's not clear if the 
reverse mapping is actually used or would work as expected.


/* Map a virtual key into something the Mac understands */
int mapVirtualKey(int virtKey)
   switch (virtKey) {
     case VK_DELETE: return 127;
     case VK_INSERT: return 5;
     case VK_PRIOR:  return 11;
     case VK_NEXT :  return 12;
     case VK_END  :  return 4;
     case VK_HOME :  return 1;
     case VK_LEFT :  return 28;
     case VK_RIGHT:  return 29;
     case VK_UP   :  return 30;
     case VK_DOWN :  return 31;
     case VK_RETURN: return 13;
     case VK_TAB	: 	return 9;
   return 0;

More information about the Vm-dev mailing list