mirror of
https://github.com/emilk/egui.git
synced 2026-08-30 13:20:05 -04:00
Browser Hotkey Conflicts (#1697)
* code hotkey to N, move superscript hotkey to Y ctrl A S D F G H are all taken, CTRL Q is traditionally to remove formatting and should be reserved for that. CTRL W E R T are also all taken. CTRL Z X C V are taken so all of the first 4/5 keys of each row except Q are inaccessible. * strike through conflict, update text * fixed underline command * added ALTSHIFT, browser documentation * underline ALTSHIFT Q it leaves the Q character which is considered a bug but before this pull underline was not working entirely so this is progress * update text * ALTSHIFT is treated as a command * added eighth command, ALTSHIFT+W adds two spaces * CTRL+Y to toggle case on text_edit demo * better code * Revised Menu * fix dead link * Update lib.rs * Update easy_mark_editor.rs * Update egui/src/data/input.rs Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com> * update * reverted variables used for debugging * fixed labels hotkey conflict * comments * fmt * cargo fmt * Nice hotkey menu Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
This commit is contained in:
@@ -323,6 +323,13 @@ impl Modifiers {
|
||||
mac_cmd: false,
|
||||
command: false,
|
||||
};
|
||||
pub const ALT_SHIFT: Self = Self {
|
||||
alt: true,
|
||||
ctrl: false,
|
||||
shift: true,
|
||||
mac_cmd: false,
|
||||
command: false,
|
||||
};
|
||||
/// The Mac ⌘ Command key
|
||||
pub const MAC_CMD: Self = Self {
|
||||
alt: false,
|
||||
@@ -429,7 +436,7 @@ impl std::ops::BitOr for Modifiers {
|
||||
/// plus a few that are useful for detecting keyboard shortcuts.
|
||||
///
|
||||
/// Many keys are omitted because they are not always physical keys (depending on keyboard language), e.g. `;` and `§`,
|
||||
/// and are therefor unsuitable as keyboard shortcuts if you want your app to be portable.
|
||||
/// and are therefore unsuitable as keyboard shortcuts if you want your app to be portable.
|
||||
#[derive(Clone, Copy, Debug, Eq, Ord, PartialEq, PartialOrd, Hash)]
|
||||
#[cfg_attr(feature = "serde", derive(serde::Deserialize, serde::Serialize))]
|
||||
pub enum Key {
|
||||
@@ -474,37 +481,37 @@ pub enum Key {
|
||||
|
||||
A, // Used for cmd+A (select All)
|
||||
B,
|
||||
C,
|
||||
D,
|
||||
E,
|
||||
F,
|
||||
G,
|
||||
H,
|
||||
I,
|
||||
J,
|
||||
C, // |CMD COPY|
|
||||
D, // |CMD BOOKMARK|
|
||||
E, // |CMD SEARCH|
|
||||
F, // |CMD FIND firefox & chrome|
|
||||
G, // |CMD FIND chrome|
|
||||
H, // |CMD History|
|
||||
I, // italics
|
||||
J, // |CMD SEARCH firefox/DOWNLOAD chrome|
|
||||
K, // Used for ctrl+K (delete text after cursor)
|
||||
L,
|
||||
M,
|
||||
N,
|
||||
O,
|
||||
P,
|
||||
O, // |CMD OPEN|
|
||||
P, // |CMD PRINT|
|
||||
Q,
|
||||
R,
|
||||
S,
|
||||
T,
|
||||
R, // |CMD REFRESH|
|
||||
S, // |CMD SAVE|
|
||||
T, // |CMD TAB|
|
||||
U, // Used for ctrl+U (delete text before cursor)
|
||||
V,
|
||||
V, // |CMD PASTE|
|
||||
W, // Used for ctrl+W (delete previous word)
|
||||
X,
|
||||
X, // |CMD CUT|
|
||||
Y,
|
||||
Z, // Used for cmd+Z (undo)
|
||||
Z, // |CMD UNDO|
|
||||
|
||||
// The function keys:
|
||||
F1,
|
||||
F2,
|
||||
F3,
|
||||
F4,
|
||||
F5,
|
||||
F5, // |CMD REFRESH|
|
||||
F6,
|
||||
F7,
|
||||
F8,
|
||||
|
||||
Reference in New Issue
Block a user