Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Impossible to create an instance of or use Input struct in uefi::console::text::input #1754

Closed
@King-Caleb

Description

Impossible to create an instance of or use Input struct in uefi::console::text::input

Hello,

I'm trying to read keyboard input using the latest uefi crate (0.35.0), but I ran into a problem with the Input struct in uefi::console::text::input.

The documentation for Input is very sparse, and it seems impossible to create an instance manually. For example, trying to do something like:

let input = Input::new(); // Doesn't exist

fails because the struct is opaque and has no public constructor.

I also tried using the system table inside my entry function:

#[entry]
fn kernel_main(handle: Handle, mut st: SystemTable<Boot>) -> Status {
 let input = st.stdin(); // returns &Input
 // ... but entry function can't have arguments
}

Even the docs examples don't work.

Could the maintainers clarify:

  1. How to properly obtain and use an Input handle in uefi 0.35.0?
  2. Are there any working examples for reading keyboard input with the current version?

Thank you for your time and for maintaining the crate!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

        AltStyle によって変換されたページ (->オリジナル) /