Skip to content

Conversation

@varphone
Copy link
Contributor

@varphone varphone commented Feb 8, 2024

What's New

  • eframe: Added App::raw_input_hook allows for the manipulation or filtering of raw input events
    A filter applied to raw input before [Self::update]
    This allows for the manipulation or filtering of input events before they are processed by egui.
    This can be used to exclude specific keyboard shortcuts, mouse events, etc.
    Additionally, it can be used to add custom keyboard or mouse events generated by a virtual keyboard.
  • examples: Added an example to demonstrates how to implement a custom virtual keyboard.
eframe-custom-keypad.webm

@varphone varphone force-pushed the feature/custom-keypad branch 5 times, most recently from cffa313 to 4a2a3b7 Compare February 11, 2024 04:14
Copy link
Owner

@emilk emilk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very cool example!

@emilk emilk added the eframe Relates to epi and eframe label Feb 16, 2024
@varphone varphone force-pushed the feature/custom-keypad branch from 4a2a3b7 to 25d5205 Compare March 8, 2024 14:48
@varphone varphone changed the title eframe: Added App::filter_raw_input_inplace allows for the manipulation or filtering of raw input events eframe: Added App::raw_input_hook allows for the manipulation or filtering of raw input events Mar 8, 2024
@emilk emilk merged commit 827fdef into emilk:master Mar 12, 2024
emilk pushed a commit that referenced this pull request Jun 18, 2024
## What's new
* Extends @varphone's excellent `raw_input_hook` idea from
#4008 to `web/app_runner`.

## Details
Debugging this locally after my app's `raw_input_hook` wasn't being
called, I realized it's not in the code path of eframe's web runner,
only the native integration. Below is a toy example running on the web.


https://github.com/emilk/egui/assets/8173478/d470b7e6-d393-4ead-9745-3aafc72ae6bc
hacknus pushed a commit to hacknus/egui that referenced this pull request Oct 30, 2024
…ltering of raw input events (emilk#4008)

# What's New

* eframe: Added `App::raw_input_hook` allows for the manipulation or
filtering of raw input events
   A filter applied to raw input before [`Self::update`]
This allows for the manipulation or filtering of input events before
they are processed by egui.
This can be used to exclude specific keyboard shortcuts, mouse events,
etc.
Additionally, it can be used to add custom keyboard or mouse events
generated by a virtual keyboard.
* examples: Added an example to demonstrates how to implement a custom
virtual keyboard.


[eframe-custom-keypad.webm](https://github.com/emilk/egui/assets/1274171/a9dc8e34-2c35-4172-b7ef-41010b794fb8)
hacknus pushed a commit to hacknus/egui that referenced this pull request Oct 30, 2024
## What's new
* Extends @varphone's excellent `raw_input_hook` idea from
emilk#4008 to `web/app_runner`.

## Details
Debugging this locally after my app's `raw_input_hook` wasn't being
called, I realized it's not in the code path of eframe's web runner,
only the native integration. Below is a toy example running on the web.


https://github.com/emilk/egui/assets/8173478/d470b7e6-d393-4ead-9745-3aafc72ae6bc
@varphone varphone deleted the feature/custom-keypad branch November 15, 2025 11:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

eframe Relates to epi and eframe

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants