Skip to content

Commit

Permalink
Quickfix glfw shift-key handling
Browse files Browse the repository at this point in the history
All of the glfw demo headers unset shift keypresses when the ctrl key is not
also down.
I can't think of a reason this would be desired and it appears no other demo
code does this.
Unless I'm mistaken, simply removing these lines leaves us with the desired
behaviour.
  • Loading branch information
bolt committed Jul 11, 2024
1 parent 0319c0f commit 0883109
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 5 deletions.
1 change: 0 additions & 1 deletion demo/glfw_opengl2/nuklear_glfw_gl2.h
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,6 @@ nk_glfw3_new_frame(void)
nk_input_key(ctx, NK_KEY_COPY, 0);
nk_input_key(ctx, NK_KEY_PASTE, 0);
nk_input_key(ctx, NK_KEY_CUT, 0);
nk_input_key(ctx, NK_KEY_SHIFT, 0);
}

glfwGetCursorPos(win, &x, &y);
Expand Down
1 change: 0 additions & 1 deletion demo/glfw_opengl3/nuklear_glfw_gl3.h
Original file line number Diff line number Diff line change
Expand Up @@ -468,7 +468,6 @@ nk_glfw3_new_frame(struct nk_glfw* glfw)
nk_input_key(ctx, NK_KEY_COPY, 0);
nk_input_key(ctx, NK_KEY_PASTE, 0);
nk_input_key(ctx, NK_KEY_CUT, 0);
nk_input_key(ctx, NK_KEY_SHIFT, 0);
}

glfwGetCursorPos(win, &x, &y);
Expand Down
1 change: 0 additions & 1 deletion demo/glfw_opengl4/nuklear_glfw_gl4.h
Original file line number Diff line number Diff line change
Expand Up @@ -619,7 +619,6 @@ nk_glfw3_new_frame(void)
nk_input_key(ctx, NK_KEY_COPY, 0);
nk_input_key(ctx, NK_KEY_PASTE, 0);
nk_input_key(ctx, NK_KEY_CUT, 0);
nk_input_key(ctx, NK_KEY_SHIFT, 0);
}

glfwGetCursorPos(win, &x, &y);
Expand Down
1 change: 0 additions & 1 deletion demo/glfw_vulkan/nuklear_glfw_vulkan.h
Original file line number Diff line number Diff line change
Expand Up @@ -1322,7 +1322,6 @@ NK_API void nk_glfw3_new_frame(void) {
nk_input_key(ctx, NK_KEY_COPY, 0);
nk_input_key(ctx, NK_KEY_PASTE, 0);
nk_input_key(ctx, NK_KEY_CUT, 0);
nk_input_key(ctx, NK_KEY_SHIFT, 0);
}

glfwGetCursorPos(win, &x, &y);
Expand Down
1 change: 0 additions & 1 deletion demo/glfw_vulkan/src/nuklear_glfw_vulkan.in.h
Original file line number Diff line number Diff line change
Expand Up @@ -1099,7 +1099,6 @@ NK_API void nk_glfw3_new_frame(void) {
nk_input_key(ctx, NK_KEY_COPY, 0);
nk_input_key(ctx, NK_KEY_PASTE, 0);
nk_input_key(ctx, NK_KEY_CUT, 0);
nk_input_key(ctx, NK_KEY_SHIFT, 0);
}

glfwGetCursorPos(win, &x, &y);
Expand Down

0 comments on commit 0883109

Please sign in to comment.