The International Simutrans Forum

Development => Bug Reports => Topic started by: ArthurDenture on July 05, 2009, 08:58:26 PM

Title: [bug r2570] Arrow keys not recognized on Macbook Pro
Post by: ArthurDenture on July 05, 2009, 08:58:26 PM
Hi,

On my Macbook Pro laptop, Simutrans does not respond to the arrow keys or to PgUp-PgDown (which are Fn+arrow keys). Pressing these keys brings up the keyboard help screen. Needless to say, this makes the game unplayable (the only way to scroll is with the numbers on the top of the keyboard). This behavior happened with 102.0, and I double-checked with the latest nightly (r2570).

I looked around in pak/config, and I don't see any configurations that I can tweak to work around this (menuconf.tab does not include the arrow keys, it seems).

Here are the relevant details:
- Intel MacBook Pro
- Mac OS X 10.5.7
- same problem with pak64 or pak128
- I'm using sdl 1.2.13 and sdl-mixer 1.2.8, provided by the Fink package management system. (I tried installing SDL in /Library/Frameworks as recommended on the download page, but the binary refused to start, complaining about missing /sw/lib/libSDL-1.2.0.dylib, but that's a separate bug report that I should get around to filing.)

Please let me know if you'd like any other system information, or if anyone else also is encountering this bug.
Title: Re: [bug r2570] Arrow keys not recognized on Macbook Pro
Post by: prissi on July 05, 2009, 09:14:00 PM
I think this is a problem of SDL, as the MAC version of SDL should also match those virtual keys. Does page up/down work as intended?

(And you can scroll via "right" mouse or minimap too ... )
Title: Re: [bug r2570] Arrow keys not recognized on Macbook Pro
Post by: ArthurDenture on July 05, 2009, 09:36:26 PM
Page up and page down only exist as Fn+Up and Fn+Down, respectively - though I think the translation might be low-level enough that SDL does see them as page up and page down (for the same reason that it's more or less impossible to, say, swap the Fn and Ctrl keys). Either way, the game does not recognize them.

I'll try later this evening with an external keyboard to see if it's specifically a problem with funny keycodes being sent out or if it's that SDL
 does not see any arrow keys at all.

Thanks for pointing out the right mouse button. Clicking and dragging while holding the Cmd key does indeed scroll, which is a reasonable workaround.

(By the way, do most Mac users tend to use fink? I find it odd that the default binaries look for a library under /sw. But I'm primarily a Linux user - under which simutrans works absolutely great - so maybe I'm just missing something obvious.)
Title: Re: [bug r2570] Arrow keys not recognized on Macbook Pro
Post by: ArthurDenture on July 06, 2009, 01:01:21 AM
Ok, I tried with an external USB keyboard (with a PC-style layout), and the arrow keys and PgUp+PgDn still do not work. That suggests that there is a more general problem with the Mac port (or with SDL), rather than it specifically having trouble recognizing the laptop keyboard.
Title: Re: [bug r2570] Arrow keys not recognized on Macbook Pro
Post by: londonium on September 03, 2010, 10:22:48 PM
Did you ever find a way around this? I'm experiencing the same problem. So close and yet so far.  :-[
Title: Re: [bug r2570] Arrow keys not recognized on Macbook Pro
Post by: ArthurDenture on September 04, 2010, 08:22:51 PM
Yes, the arrow keys have been working fine for me since at least July. If 102.2.2 doesn't work for you, perhaps try a nightly build?