pub async fn all_keyboard_messages() -> Result<Receiver<input_device::InputMessage>, Error> {
    let bindings = all_keyboard_bindings().await?;
    let (message_sender, message_receiver) =
        futures::channel::mpsc::channel(input_device::INPUT_MESSAGE_BUFFER_SIZE);

    for mut keyboard in bindings {
        let mut sender = message_sender.clone();
        fasync::spawn(async move {
            while let Some(report) = keyboard.input_message_stream().next().await {
                let _ = sender.try_send(report);
            }
        });
    }

    Ok(message_receiver)
}
/// Returns a stream of InputMessages from all keyboard devices.
///
/// # Errors
/// If there was an error binding to any keyboard.
Returns a stream of InputMessages from all keyboard devices.
Returns a stream of InputMessages from all keyboard devices .
pub async fn all_keyboard_messages() -> Result<Receiver<input_device::InputMessage>, Error> {
    let bindings = all_keyboard_bindings().await?;
    let (message_sender, message_receiver) =
        futures::channel::mpsc::channel(input_device::INPUT_MESSAGE_BUFFER_SIZE);
    for mut keyboard in bindings {
        let mut sender = message_sender.clone();
        fasync::spawn(async move {
            while let Some(report) = keyboard.input_message_stream().next().await {
                let _ = sender.try_send(report);
            }
        });
    }
    Ok(message_receiver)
}
pub async fn all_keyboard_messages ( ) -> Result < Receiver < input_device :: InputMessage > , Error > { let bindings = all_keyboard_bindings ( ) . await ? ; let ( message_sender , message_receiver ) = futures :: channel :: mpsc :: channel ( input_device :: INPUT_MESSAGE_BUFFER_SIZE ) ; for mut keyboard in bindings { let mut sender = message_sender . clone ( ) ; fasync :: spawn ( async move { while let Some ( report ) = keyboard . input_message_stream ( ) . next ( ) . await { let _ = sender . try_send ( report ) ; } } ) ; } Ok ( message_receiver ) }
Returns a stream of InputMessages from all keyboard devices.
Returns a stream of InputMessages from all keyboard devices .
errors
If there was an error binding to any keyboard.
If there was an error binding to any keyboard .