mirror of
https://github.com/italicsjenga/muda.git
synced 2024-12-24 04:11:30 +11:00
chore: change CMD_OR_CTRL
export location
This commit is contained in:
parent
460e88d279
commit
db49402b5b
|
@ -30,6 +30,11 @@
|
||||||
pub use keyboard_types::{Code, Modifiers};
|
pub use keyboard_types::{Code, Modifiers};
|
||||||
use std::{borrow::Borrow, hash::Hash, str::FromStr};
|
use std::{borrow::Borrow, hash::Hash, str::FromStr};
|
||||||
|
|
||||||
|
#[cfg(target_os = "macos")]
|
||||||
|
pub const CMD_OR_CTRL: Modifiers = Modifiers::SUPER;
|
||||||
|
#[cfg(not(target_os = "macos"))]
|
||||||
|
pub const CMD_OR_CTRL: Modifiers = Modifiers::CONTROL;
|
||||||
|
|
||||||
/// A keyboard shortcut that consists of an optional combination
|
/// A keyboard shortcut that consists of an optional combination
|
||||||
/// of modifier keys (provided by [`Modifiers`](crate::accelerator::Modifiers)) and
|
/// of modifier keys (provided by [`Modifiers`](crate::accelerator::Modifiers)) and
|
||||||
/// one key ([`Code`](crate::accelerator::Code)).
|
/// one key ([`Code`](crate::accelerator::Code)).
|
||||||
|
|
|
@ -4,14 +4,12 @@
|
||||||
|
|
||||||
use std::{cell::RefCell, rc::Rc};
|
use std::{cell::RefCell, rc::Rc};
|
||||||
|
|
||||||
use crate::{accelerator::Accelerator, AboutMetadata, IsMenuItem, MenuItemType};
|
use crate::{
|
||||||
|
accelerator::{Accelerator, CMD_OR_CTRL},
|
||||||
|
AboutMetadata, IsMenuItem, MenuItemType,
|
||||||
|
};
|
||||||
use keyboard_types::{Code, Modifiers};
|
use keyboard_types::{Code, Modifiers};
|
||||||
|
|
||||||
#[cfg(target_os = "macos")]
|
|
||||||
pub const CMD_OR_CTRL: Modifiers = Modifiers::META;
|
|
||||||
#[cfg(not(target_os = "macos"))]
|
|
||||||
pub const CMD_OR_CTRL: Modifiers = Modifiers::CONTROL;
|
|
||||||
|
|
||||||
/// A predefined (native) menu item which has a predfined behavior by the OS or by this crate.
|
/// A predefined (native) menu item which has a predfined behavior by the OS or by this crate.
|
||||||
pub struct PredefinedMenuItem(pub(crate) Rc<RefCell<crate::platform_impl::MenuChild>>);
|
pub struct PredefinedMenuItem(pub(crate) Rc<RefCell<crate::platform_impl::MenuChild>>);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue