pub struct KeyPressEvent {
pub key_code: i32,
pub scan_code: i32,
pub action: i32,
pub modifiers: i32,
}Expand description
Fired on every key press, release, or repeat (client-side).
Return false in the handler to prevent Minecraft from processing the key.
Fields§
§key_code: i32GLFW key code (e.g. 69 = E). See org.lwjgl.glfw.GLFW.
scan_code: i32§action: i320 = release, 1 = press, 2 = repeat.
modifiers: i32Modifier bitmask: 1=Shift, 2=Ctrl, 4=Alt, 8=Super.
Trait Implementations§
Source§impl Clone for KeyPressEvent
impl Clone for KeyPressEvent
Source§fn clone(&self) -> KeyPressEvent
fn clone(&self) -> KeyPressEvent
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for KeyPressEvent
impl RefUnwindSafe for KeyPressEvent
impl Send for KeyPressEvent
impl Sync for KeyPressEvent
impl Unpin for KeyPressEvent
impl UnsafeUnpin for KeyPressEvent
impl UnwindSafe for KeyPressEvent
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more