pub fn pressed_scancodes(&self) -> PressedScancodeIterator {
        PressedScancodeIterator {
            iter: self.scancodes(),
        }
    }
/// Returns an iterator of pressed scancodes.
///
/// # Example
/// ```no_run
/// use sdl2::keyboard::Keycode;
/// use sdl2::keyboard::Scancode;
/// use std::collections::HashSet;
///
/// fn pressed_scancode_set(e: &sdl2::EventPump) -> HashSet<Scancode> {
///     e.keyboard_state().pressed_scancodes().collect()
/// }
///
/// fn pressed_keycode_set(e: &sdl2::EventPump) -> HashSet<Keycode> {
///     e.keyboard_state().pressed_scancodes()
///         .filter_map(Keycode::from_scancode)
///         .collect()
/// }
///
/// fn newly_pressed(old: &HashSet<Scancode>, new: &HashSet<Scancode>) -> HashSet<Scancode> {
///     new - old
///     // sugar for: new.difference(old).collect()
/// }
/// ```
Returns an iterator of pressed scancodes.
Returns an iterator of pressed scancodes .
pub fn pressed_scancodes(&self) -> PressedScancodeIterator {
        PressedScancodeIterator {
            iter: self.scancodes(),
        }
    }
pub fn pressed_scancodes ( & self ) -> PressedScancodeIterator { PressedScancodeIterator { iter : self . scancodes ( ) , } }
Returns an iterator of pressed scancodes.
Returns an iterator of pressed scancodes .
&self
&self
example
```no_run
use sdl2::keyboard::Keycode;
use sdl2::keyboard::Scancode;
use std::collections::HashSet.

fn pressed_scancode_set(e: &sdl2::EventPump) -> HashSet {
e.keyboard_state().pressed_scancodes().collect()
}

fn pressed_keycode_set(e: &sdl2::EventPump) -> HashSet {
e.keyboard_state().pressed_scancodes()
.filter_map(Keycode::from_scancode)
.collect()
}

fn newly_pressed(old: &HashSet, new: &HashSet) -> HashSet {
new - old
sugar for: new.difference(old).collect()
}
```
` ` ` no_run use sdl2 :: keyboard :: Keycode ; use sdl2 :: keyboard :: Scancode ; use std :: collections :: HashSet . fn pressed_scancode_set ( e : &sdl2 :: EventPump ) - > HashSet { e . keyboard_state () . pressed_scancodes () . collect () } fn pressed_keycode_set ( e : &sdl2 :: EventPump ) - > HashSet { e . keyboard_state () . pressed_scancodes () . filter_map ( Keycode :: from_scancode ) . collect () } fn newly_pressed ( old : &HashSet new : &HashSet ) - > HashSet { new - old sugar for : new . difference ( old ) . collect () } ` ` `