Keyboard shortcuts remapping for more consistency/ergonomy.

This commit is contained in:
Offray Vladimir Luna Cárdenas 2023-01-06 10:31:39 -05:00
parent a88af11245
commit c3e3902cd0
1 changed files with 48 additions and 0 deletions

View File

@ -4,6 +4,32 @@ Class {
#category : #MiniDocs
}
{ #category : #accessing }
MiniDocs class >> altKeys [
^ BlAlternativeCombination new
with: (BlSingleKeyCombination key:BlKeyboardKey altLeft);
with: (BlSingleKeyCombination key:BlKeyboardKey altRight);
yourself.
]
{ #category : #accessing }
MiniDocs class >> altShiftLeftCombo [
^ BlCompulsoryCombination new
with: self altKeys;
with: self shiftKeys;
with: (BlSingleKeyCombination key: BlKeyboardKey arrowLeft);
yourself
]
{ #category : #accessing }
MiniDocs class >> altShiftRightCombo [
^ BlCompulsoryCombination new
with: self altKeys;
with: self shiftKeys;
with: (BlSingleKeyCombination key: BlKeyboardKey arrowRight);
yourself
]
{ #category : #accessing }
MiniDocs class >> appFolder [
| tempFolder userDataFolder |
@ -29,6 +55,28 @@ MiniDocs class >> installYamlToJson [
^ MiniDocs appFolder ]
]
{ #category : #accessing }
MiniDocs class >> keyboardShortcutsRemapping [
| primaryNewLine secondaryNewLine |
primaryNewLine := LeSnippetElement keyboardShortcuts at: #NewLine.
secondaryNewLine := LeSnippetElement keyboardShortcuts at: #SecondaryNewLine.
^ LeSnippetElement keyboardShortcuts
at: #NewLine put: secondaryNewLine;
at: #SecondaryNewLine put: primaryNewLine;
at: #IndentSnippet put: self altShiftRightCombo;
at: #UnindentSnippet put: self altShiftLeftCombo;
yourself
]
{ #category : #accessing }
MiniDocs class >> shiftKeys [
^ BlAlternativeCombination new
with: (BlSingleKeyCombination key:BlKeyboardKey shiftLeft);
with: (BlSingleKeyCombination key:BlKeyboardKey shiftRight);
yourself.
]
{ #category : #accessing }
MiniDocs class >> yamlToJson: yamlString [
"This method uses a external binary written in Nim, as the native Pharo parser for YAML, written in PetitParser,