Remove key_without_modifiers call on iOS (#418)

I had trouble getting masonry to compile for iOS due to a winit platform
method call that's not supported. There's already a cfg for android so I
just added iOS to it.

Reproduction:

```
cargo check --target aarch64-apple-ios
```

---------

Co-authored-by: Daniel McNab <36049421+DJMcNab@users.noreply.github.com>
This commit is contained in:
Johan Holmerin 2024-06-30 20:50:52 +02:00 committed by GitHub
parent 032e86216a
commit 1daf711d7f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 2 deletions

View File

@ -278,12 +278,12 @@ impl<T: Selectable> TextWithSelection<T> {
///
/// `key_without_modifiers` is only available on some platforms
fn shortcut_key(key: &winit::event::KeyEvent) -> winit::keyboard::Key {
#[cfg(not(target_os = "android"))]
#[cfg(not(any(target_os = "android", target_os = "ios")))]
{
use winit::platform::modifier_supplement::KeyEventExtModifierSupplement;
key.key_without_modifiers()
}
#[cfg(target_os = "android")]
#[cfg(any(target_os = "android", target_os = "ios"))]
// We think it will be rare that users are using a physical keyboard with Android,
// and so we don't really need to worry *too much* about the text selection shortcuts
key.logical_key.clone()