input: Move caret to line start or end with selected content (#288)
Ref: https://support.apple.com/en-hk/102650 --------- Co-authored-by: Jason Lee <huacnlee@gmail.com>
This commit is contained in:
parent
b9e7217662
commit
20b9f9c0f2
1 changed files with 8 additions and 0 deletions
|
|
@ -77,6 +77,10 @@ pub fn init(cx: &mut AppContext) {
|
|||
KeyBinding::new("shift-home", SelectToHome, Some(CONTEXT)),
|
||||
KeyBinding::new("shift-end", SelectToEnd, Some(CONTEXT)),
|
||||
#[cfg(target_os = "macos")]
|
||||
KeyBinding::new("shift-cmd-left", SelectToHome, Some(CONTEXT)),
|
||||
#[cfg(target_os = "macos")]
|
||||
KeyBinding::new("shift-cmd-right", SelectToEnd, Some(CONTEXT)),
|
||||
#[cfg(target_os = "macos")]
|
||||
KeyBinding::new("ctrl-cmd-space", ShowCharacterPalette, Some(CONTEXT)),
|
||||
#[cfg(target_os = "macos")]
|
||||
KeyBinding::new("cmd-a", SelectAll, Some(CONTEXT)),
|
||||
|
|
@ -97,8 +101,12 @@ pub fn init(cx: &mut AppContext) {
|
|||
#[cfg(target_os = "macos")]
|
||||
KeyBinding::new("ctrl-a", Home, Some(CONTEXT)),
|
||||
#[cfg(target_os = "macos")]
|
||||
KeyBinding::new("cmd-left", Home, Some(CONTEXT)),
|
||||
#[cfg(target_os = "macos")]
|
||||
KeyBinding::new("ctrl-e", End, Some(CONTEXT)),
|
||||
#[cfg(target_os = "macos")]
|
||||
KeyBinding::new("cmd-right", End, Some(CONTEXT)),
|
||||
#[cfg(target_os = "macos")]
|
||||
KeyBinding::new("cmd-z", Undo, Some(CONTEXT)),
|
||||
#[cfg(target_os = "macos")]
|
||||
KeyBinding::new("cmd-shift-z", Redo, Some(CONTEXT)),
|
||||
|
|
|
|||
Loading…
Reference in a new issue