ArlecchinoKeymap class
Namespace: Arlecchino.Hosting · Assembly: Arlecchino
Every key the framework itself reacts to, in one place. Replace the whole map through UseKeymap, or one binding at a time with with; each binding also relabels itself in the hints box and the palette.
public sealed class ArlecchinoKeymap : IEquatable<ArlecchinoKeymap>
Implements IEquatable<T><ArlecchinoKeymap>
Constructors
| Member | Summary |
|---|---|
ArlecchinoKeymap() |
Properties
| Member | Summary |
|---|---|
Back | Goes back in the history. Alt+← by default. |
Cancel | Dismisses a dialog or leaves a screen. Esc by default. |
Complete | Finishes the word being typed, where the line has something to finish it from. Tab by default, the same key that moves to the next field: the line being typed into is asked first. |
CompleteBack | Steps back through what was offered for the word. Shift+Tab by default. |
Confirm | Accepts a dialog, opens a field, activates a row. Enter by default. |
Copy | Copies what is being edited to the clipboard, under both habits: Ctrl+Insert and Ctrl+Shift+C. Plain Ctrl+C is left alone, since it stops the application, and a terminal that keeps Ctrl+Shift+C for its own copying never passes it on. |
Cut | Cuts the selection to the clipboard, under both habits: Shift+Delete and Ctrl+Shift+X. |
DeleteForward | Deletes the character after the caret. Delete by default. |
Erase | Deletes: a character, a filter, a typed segment, a field value. Backspace by default. |
EraseToStart | Deletes everything before the caret. Ctrl+U by default, as in a shell. |
EraseWord | Deletes the word before the caret, under both habits: Ctrl+Backspace and Alt+Backspace, which is what a Mac rubs a word out with. |
First | Goes to the start of a list or the minimum of a range. Home by default. |
Forward | Retraces a step back. Alt+→ by default. |
Help | Opens the screen listing every key. F1 by default. |
JumpDown | A long stride downward, or a page of rows. PgDn by default. |
JumpUp | A long stride upward, or a page of rows. PgUp by default. |
Last | Goes to the end of a list or the maximum of a range. End by default. |
Mark | Marks a row or flips a toggle. Space by default. |
MoveDown | Moves the cursor down, or steps a number down. ↓ by default. |
MoveLeft | Moves left: a slider down, a tree node closed, out of a folder. ← by default. |
MoveRight | Moves right: a slider up, a tree node open, into a folder. → by default. |
MoveUp | Moves the cursor up, or steps a number up. ↑ by default. |
NextField | Moves to the next pane, segment or channel. Tab by default. |
Notifications | Opens the screen listing what the application has said lately. |
PickCurrentFolder | Picks the folder open in the file picker. Ctrl+Enter by default. |
PreviousField | Moves to the previous one. Shift+Tab by default. |
SelectAll | Selects everything that is being edited. Ctrl+A by default. |
SelectDown | Takes the selection one row down, where the text has rows. Shift+↓ by default. |
SelectLeft | Takes the selection one symbol to the left. Shift+← by default. |
SelectRight | Takes the selection one symbol to the right. Shift+→ by default. |
SelectToEnd | Takes the selection on to the end of the line. Shift+End by default. |
SelectToStart | Takes the selection back to the start of the line. Shift+Home by default. |
SelectUp | Takes the selection one row up, where the text has rows. Shift+↑ by default. |
SelectWordLeft | Takes the selection a word to the left, under both habits: Ctrl+Shift+← and Alt+Shift+←. |
SelectWordRight | Takes the selection a word to the right, under both habits: Ctrl+Shift+→ and Alt+Shift+→. |
Submit | Accepts a dialog where Enter means something else — the multi-line text area, where it starts a new line. Ctrl+Enter by default. |
ToggleLog | Shows or hides the log overlay. Ctrl+L by default. |
WordLeft | Moves the caret to the previous word, under both habits: Ctrl+← and Alt+←, which is what a Mac moves by word on. |
WordRight | Moves the caret past the next word, under both habits: Ctrl+→ and Alt+→, which is what a Mac moves by word on. |
Methods
| Member | Summary |
|---|---|
Replacing(KeyModifiers, KeyModifiers) | The whole map with one modifier put in place of another, for a keyboard that cannot send the one the bindings were written on. Rewriting thirty bindings by hand leaves twenty-eight rewritten. |
Constructors in detail
ArlecchinoKeymap()
public ArlecchinoKeymap();
Properties in detail
Back
public KeyBinding Back { get; init; }
Goes back in the history. Alt+← by default.
Type KeyBinding
Cancel
public KeyBinding Cancel { get; init; }
Dismisses a dialog or leaves a screen. Esc by default.
Type KeyBinding
Complete
public KeyBinding Complete { get; init; }
Finishes the word being typed, where the line has something to finish it from. Tab by default, the same key that moves to the next field: the line being typed into is asked first.
Type KeyBinding
CompleteBack
public KeyBinding CompleteBack { get; init; }
Steps back through what was offered for the word. Shift+Tab by default.
Type KeyBinding
Confirm
public KeyBinding Confirm { get; init; }
Accepts a dialog, opens a field, activates a row. Enter by default.
Type KeyBinding
Copy
public KeyBinding Copy { get; init; }
Copies what is being edited to the clipboard, under both habits: Ctrl+Insert and Ctrl+Shift+C. Plain Ctrl+C is left alone, since it stops the application, and a terminal that keeps Ctrl+Shift+C for its own copying never passes it on.
Type KeyBinding
Cut
public KeyBinding Cut { get; init; }
Cuts the selection to the clipboard, under both habits: Shift+Delete and Ctrl+Shift+X.
Type KeyBinding
DeleteForward
public KeyBinding DeleteForward { get; init; }
Deletes the character after the caret. Delete by default.
Type KeyBinding
Erase
public KeyBinding Erase { get; init; }
Deletes: a character, a filter, a typed segment, a field value. Backspace by default.
Type KeyBinding
EraseToStart
public KeyBinding EraseToStart { get; init; }
Deletes everything before the caret. Ctrl+U by default, as in a shell.
Type KeyBinding
EraseWord
public KeyBinding EraseWord { get; init; }
Deletes the word before the caret, under both habits: Ctrl+Backspace and Alt+Backspace, which is what a Mac rubs a word out with.
Type KeyBinding
First
public KeyBinding First { get; init; }
Goes to the start of a list or the minimum of a range. Home by default.
Type KeyBinding
Forward
public KeyBinding Forward { get; init; }
Retraces a step back. Alt+→ by default.
Type KeyBinding
Help
public KeyBinding Help { get; init; }
Opens the screen listing every key. F1 by default.
Type KeyBinding
JumpDown
public KeyBinding JumpDown { get; init; }
A long stride downward, or a page of rows. PgDn by default.
Type KeyBinding
JumpUp
public KeyBinding JumpUp { get; init; }
A long stride upward, or a page of rows. PgUp by default.
Type KeyBinding
Last
public KeyBinding Last { get; init; }
Goes to the end of a list or the maximum of a range. End by default.
Type KeyBinding
Mark
public KeyBinding Mark { get; init; }
Marks a row or flips a toggle. Space by default.
Type KeyBinding
MoveDown
public KeyBinding MoveDown { get; init; }
Moves the cursor down, or steps a number down. ↓ by default.
Type KeyBinding
MoveLeft
public KeyBinding MoveLeft { get; init; }
Moves left: a slider down, a tree node closed, out of a folder. ← by default.
Type KeyBinding
MoveRight
public KeyBinding MoveRight { get; init; }
Moves right: a slider up, a tree node open, into a folder. → by default.
Type KeyBinding
MoveUp
public KeyBinding MoveUp { get; init; }
Moves the cursor up, or steps a number up. ↑ by default.
Type KeyBinding
NextField
public KeyBinding NextField { get; init; }
Moves to the next pane, segment or channel. Tab by default.
Type KeyBinding
Notifications
public KeyBinding Notifications { get; init; }
Opens the screen listing what the application has said lately.
Type KeyBinding
PickCurrentFolder
public KeyBinding PickCurrentFolder { get; init; }
Picks the folder open in the file picker. Ctrl+Enter by default.
Type KeyBinding
PreviousField
public KeyBinding PreviousField { get; init; }
Moves to the previous one. Shift+Tab by default.
Type KeyBinding
SelectAll
public KeyBinding SelectAll { get; init; }
Selects everything that is being edited. Ctrl+A by default.
Type KeyBinding
SelectDown
public KeyBinding SelectDown { get; init; }
Takes the selection one row down, where the text has rows. Shift+↓ by default.
Type KeyBinding
SelectLeft
public KeyBinding SelectLeft { get; init; }
Takes the selection one symbol to the left. Shift+← by default.
Type KeyBinding
SelectRight
public KeyBinding SelectRight { get; init; }
Takes the selection one symbol to the right. Shift+→ by default.
Type KeyBinding
SelectToEnd
public KeyBinding SelectToEnd { get; init; }
Takes the selection on to the end of the line. Shift+End by default.
Type KeyBinding
SelectToStart
public KeyBinding SelectToStart { get; init; }
Takes the selection back to the start of the line. Shift+Home by default.
Type KeyBinding
SelectUp
public KeyBinding SelectUp { get; init; }
Takes the selection one row up, where the text has rows. Shift+↑ by default.
Type KeyBinding
SelectWordLeft
public KeyBinding SelectWordLeft { get; init; }
Takes the selection a word to the left, under both habits: Ctrl+Shift+← and Alt+Shift+←.
Type KeyBinding
SelectWordRight
public KeyBinding SelectWordRight { get; init; }
Takes the selection a word to the right, under both habits: Ctrl+Shift+→ and Alt+Shift+→.
Type KeyBinding
Submit
public KeyBinding Submit { get; init; }
Accepts a dialog where Enter means something else — the multi-line text area, where it starts a new line. Ctrl+Enter by default.
Type KeyBinding
ToggleLog
public KeyBinding ToggleLog { get; init; }
Shows or hides the log overlay. Ctrl+L by default.
Type KeyBinding
WordLeft
public KeyBinding WordLeft { get; init; }
Moves the caret to the previous word, under both habits: Ctrl+← and Alt+←, which is what a Mac moves by word on.
Type KeyBinding
WordRight
public KeyBinding WordRight { get; init; }
Moves the caret past the next word, under both habits: Ctrl+→ and Alt+→, which is what a Mac moves by word on.
Type KeyBinding
Methods in detail
Replacing(KeyModifiers, KeyModifiers)
public ArlecchinoKeymap Replacing(KeyModifiers from, KeyModifiers to);
The whole map with one modifier put in place of another, for a keyboard that cannot send the one the bindings were written on. Rewriting thirty bindings by hand leaves twenty-eight rewritten.
Parameters
| Name | Type | Description |
|---|---|---|
from | KeyModifiers | The modifier to take out. |
to | KeyModifiers | The modifier to put in its place. |
Returns ArlecchinoKeymap — A new map, with every binding rewritten.