summaryrefslogtreecommitdiffstats
path: root/core/src/keyboard
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2022-05-04 17:19:28 +0200
committerLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2022-05-04 17:19:28 +0200
commit27fdc707562d4e229f07ed9496ed5d64f4e108bc (patch)
tree8a87286f0ccd125df1c2b5c597c2d2805ceb27c5 /core/src/keyboard
parenta97c520c814a6d3cc538537791be39e0c3182d6d (diff)
parent02914e5e68d1fbaad53483cd32c74d9ac448d1eb (diff)
downloadiced-27fdc707562d4e229f07ed9496ed5d64f4e108bc.tar.gz
iced-27fdc707562d4e229f07ed9496ed5d64f4e108bc.tar.bz2
iced-27fdc707562d4e229f07ed9496ed5d64f4e108bc.zip
Merge branch 'master' into dev/system-information
Diffstat (limited to 'core/src/keyboard')
-rw-r--r--core/src/keyboard/modifiers.rs8
1 files changed, 8 insertions, 0 deletions
diff --git a/core/src/keyboard/modifiers.rs b/core/src/keyboard/modifiers.rs
index e61f145a..ff5b08f2 100644
--- a/core/src/keyboard/modifiers.rs
+++ b/core/src/keyboard/modifiers.rs
@@ -41,21 +41,29 @@ impl Modifiers {
};
/// Returns true if the [`SHIFT`] key is pressed in the [`Modifiers`].
+ ///
+ /// [`SHIFT`]: Self::SHIFT
pub fn shift(self) -> bool {
self.contains(Self::SHIFT)
}
/// Returns true if the [`CTRL`] key is pressed in the [`Modifiers`].
+ ///
+ /// [`CTRL`]: Self::CTRL
pub fn control(self) -> bool {
self.contains(Self::CTRL)
}
/// Returns true if the [`ALT`] key is pressed in the [`Modifiers`].
+ ///
+ /// [`ALT`]: Self::ALT
pub fn alt(self) -> bool {
self.contains(Self::ALT)
}
/// Returns true if the [`LOGO`] key is pressed in the [`Modifiers`].
+ ///
+ /// [`LOGO`]: Self::LOGO
pub fn logo(self) -> bool {
self.contains(Self::LOGO)
}