Skip to content

Commit

Permalink
Add hotkeys for zoom
Browse files Browse the repository at this point in the history
  • Loading branch information
kolumb committed Feb 27, 2021
1 parent 1593d1a commit fd73f75
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ Boomer is written in Nim for Linux. Zoomer is ported to C and uses Win32 API.
| `Q` | Quit app |
| `0` | Reset zoom |
| `Mouse button` | Pan |
| `+` | Zoom in |
| `-` | Zoom out |
| `Scroll wheel` | Zoom +/- |
| `F` | Toggle flashlight |
| `Ctrl` + `Scroll wheel` | Change size of flashlight |
8 changes: 8 additions & 0 deletions src/zoomer_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,14 @@ void key_callback(GLFWwindow* window, int key, int scancode, int action, int mod
case GLFW_KEY_ESCAPE:
quitting = true;
break;
case GLFW_KEY_EQUAL:
case GLFW_KEY_KP_ADD:
camera.scale *= 1.1f;
break;
case GLFW_KEY_MINUS:
case GLFW_KEY_KP_SUBTRACT:
camera.scale *= 0.90909f;
break;
case GLFW_KEY_KP_0:
case GLFW_KEY_0:
camera.scale = 1.0f;
Expand Down

0 comments on commit fd73f75

Please sign in to comment.