浏览代码

Fix virtual key code mapping for zooming

Johannes Hofmann 7 年前
父节点
当前提交
9a40c6dfb7
共有 1 个文件被更改,包括 4 次插入1 次删除
  1. 4
    1
      src/main.rs

+ 4
- 1
src/main.rs 查看文件

@@ -192,7 +192,9 @@ fn handle_event(
192 192
                         map.move_pixel(0.0, 50.0);
193 193
                         Action::Redraw
194 194
                     },
195
-                    VirtualKeyCode::Add => {
195
+                    VirtualKeyCode::Add |
196
+                    //TODO Remove this workaround for the Windows virtual key code mapping
197
+                    VirtualKeyCode::Equals => {
196 198
                         if modifiers.ctrl {
197 199
                             map.change_tile_zoom_offset(1.0);
198 200
                         } else {
@@ -200,6 +202,7 @@ fn handle_event(
200 202
                         }
201 203
                         Action::Redraw
202 204
                     },
205
+                    VirtualKeyCode::Minus |
203 206
                     VirtualKeyCode::Subtract => {
204 207
                         if modifiers.ctrl {
205 208
                             map.change_tile_zoom_offset(-1.0);