MCPcopy Create free account
hub / github.com/OpenEndedGroup/Field2 / key

Method key

src/main/java/field/graphics/Window.java:905–928  ·  view source on GitHub ↗
(long window, int key, int scancode, int action, int mods)

Source from the content-addressed store, hash-verified

903 boolean shift = ((glfwGetKey(window, GLFW_KEY_LEFT_SHIFT)) | (glfwGetKey(window,
904 GLFW_KEY_RIGHT_SHIFT))) != 0;
905 boolean alt = ((glfwGetKey(window, GLFW_KEY_LEFT_ALT)) | (glfwGetKey(window,
906 GLFW_KEY_RIGHT_ALT))) != 0;
907 boolean meta = ((glfwGetKey(window, GLFW_KEY_LEFT_SUPER)) | (glfwGetKey(window,
908 GLFW_KEY_RIGHT_SUPER))) != 0;
909 boolean ctrl = ((glfwGetKey(window, GLFW_KEY_LEFT_CONTROL)) | (glfwGetKey(window,
910 GLFW_KEY_RIGHT_CONTROL))) != 0;
911
912// System.out.println("char> "+character);
913
914 next = next.clean(window);
915
916 fireKeyboardTransition(keyboardState, next);
917 keyboardState = next;
918
919 next = keyboardState.withChar((char) character, false);
920 next = next.clean(window);
921 fireKeyboardTransition(keyboardState, next);
922 keyboardState = next;
923 }
924 }
925
926 @Override
927 public void drop(long window, String[] files) {
928 if (window == Window.this.window) {
929 fireDrop(new Drop(files, mouseState, keyboardState));
930 }
931 }

Callers 9

requestCommandsMethod · 0.45
supportsPromptMethod · 0.45
RemoteEditorMethod · 0.45
updateMethod · 0.45
loadedMethod · 0.45
injectMethod · 0.45
completionMethod · 0.45
updateMethod · 0.45

Calls 8

cleanMethod · 0.95
withKeyMethod · 0.80
addAllMethod · 0.45
removeIfMethod · 0.45
containsMethod · 0.45
addMethod · 0.45
eventMethod · 0.45

Tested by

no test coverage detected