pub struct Keys {
pub forward: bool,
pub back: bool,
pub left: bool,
pub right: bool,
pub jump: bool,
pub sneak: bool,
pub sprint: bool,
}Expand description
Movement keys held during a tick (what the keyboard state would be in vanilla).
Fields§
§forward: boolWalk forward (W).
back: boolWalk backward (S).
left: boolStrafe left (A).
right: boolStrafe right (D).
jump: boolJump (space): jumps, swims up, flies up, double-tap toggles creative flight.
sneak: boolSneak (shift).
sprint: boolSprint key (ctrl).
Implementations§
Trait Implementations§
impl Copy for Keys
impl Eq for Keys
impl StructuralPartialEq for Keys
Auto Trait Implementations§
impl Forget for Keys
impl Freeze for Keys
impl Move for Keys
impl RefUnwindSafe for Keys
impl Send for Keys
impl Sync for Keys
impl Unpin for Keys
impl UnsafeUnpin for Keys
impl UnwindSafe for Keys
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