FS#1265 — Shortcut for zooming in with "+" not implemented
Attached to Project— OpenTTD
Opened by Sebaastian Kratzert (krase) - Sunday, 30 September 2007, 11:26AM
Opened by Sebaastian Kratzert (krase) - Sunday, 30 September 2007, 11:26AM
| Patch | |
| User Interface | |
| New | |
| No-one | |
| All |
| High | |
| Normal | |
| Devel (specify rev) | |
| Undecided | |
| Undecided | |
![]() |
On laptops where there is no numpad it's very inconvenient to zoom in by pressing Shift+F5. The "-" however is implemented so i assume that it has simply been forgotten to implement zooming in with the normal "+" key.
This task depends upon
This task blocks these from closing

wkc_plus.diff
It doesn't work on Windows or MacOS.
With the current svn version the '+' and '-' keys are working properly (zoom in/out) on windows (selfcompiled openttd)
Nightly build (r12717), windows XP: '-' works but not '+' for zooming. Which is a bit annoying to have to click on the zoom-in button in the toolbar.
(when talking about +, = and other keys the non-numpad versions are meant)
So I've taken the patch and by hand implemented it in current svn version of OpenTTD. (the drivers have been reorganized a bit since r11101) I've managed to get the keycode for Windows by simply run synergy[1] in debug level 1 and read the value from the debug window. The keycode for Mac was found after help from Mwa (on IRC). Notable, on mac = and + share the same keycode. While that is ok in this patch, someone in future might be mislead to though that WKC_PLUS and WKC_EQUALS express different keys on all platforms. So an alternative approach could be make the SDL and Win32 driver send WKC_EQUALS when '+' is detected to make it work equal on all platforms.
[1] Synergy is an open source tool to share keyboard(s) and pointing devices attached to one computer between several computers.