Zoom in keystroke uses correct shift mask.
Use generic types for output values.

This fixes some compiler warnings.