Macbooks, numeric keypads, and Avernum
Author | Topic: Macbooks, numeric keypads, and Avernum |
---|---|
Warrior
Member # 7633
|
written Thursday, January 3 2008 23:53
Profile
First, the bad news: New Macbooks don't have the "emulated numeric keypad" feature where you get a keypad by typing {jkluio789}. This makes the Avernum games a lot more annoying to play, as you can't move effectively. (The arrow keys move you in kind of weird directions, and don't work at all for the diagonals.) The good news: There's a simple solution. Right now, it's impractical for anyone except developers. (To those who are: DYLD_INSERT_LIBRARIES.) However, Jeff could integrate it into the games pretty easily - consider this a black-box code contribution. :) Here it is. Note that this should be configured to only apply to x86 systems - it's not useful on PPC, as Powerbooks have numeric keypad built-in. Posts: 66 | Registered: Saturday, November 4 2006 08:00 |
Infiltrator
Member # 5576
|
written Friday, January 4 2008 11:11
Profile
Homepage
Out of curiosity, what exactly does the proposed code block do? At a glance it's clear that it's mapping some set of nine inputs to nine others, but from what to what is it mapping? Basically, what would the difference to the user be when using the keyboard? (Save us all having to look up the virtual key codes please. :P ) -------------------- Überraschung des Dosenöffners! "On guard, you musty sofa!" Posts: 627 | Registered: Monday, March 7 2005 08:00 |
Agent
Member # 8030
|
written Friday, January 4 2008 11:23
Profile
Homepage
Have you e-mailed Jeff by any chance? Many laptops I've seen have numeric keyboards that work only if number lock is on. However, I highly doubt you wouldn't have noticed that already. -------------------- I dub thee... Posts: 1384 | Registered: Tuesday, February 6 2007 08:00 |
Warrior
Member # 7633
|
written Friday, January 4 2008 15:42
Profile
Excalibur, Apple decided to drop NumLock and the numeric keypad from the most recent revision of MacBooks. I'm not quite sure why, but my code restores it within Avernum. Good point about mailing Jeff, BTW. I'll go ahead and do that. Niemand, the specific mapping this implements is: Fn+j -> keypad 1Fn+k -> keypad 2Fn+l -> keypad 3Fn+u -> keypad 4Fn+i -> keypad 5Fn+o -> keypad 6Fn+7 -> keypad 7Fn+8 -> keypad 8Fn+9 -> keypad 9 Posts: 66 | Registered: Saturday, November 4 2006 08:00 |
Infiltrator
Member # 5576
|
written Friday, January 4 2008 17:46
Profile
Homepage
Nice; looks really useful, Duskwolf. -------------------- Überraschung des Dosenöffners! "On guard, you musty sofa!" Posts: 627 | Registered: Monday, March 7 2005 08:00 |