-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add keymap preference #178
Merged
Merged
Changes from 6 commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
68a955c
Add keymap preference
sirkrypt0 e5e4ec1
Fix minor styling
frcroth 384a25d
Merge pull request #185 from hpi-swa-teaching/dev
sirkrypt0 54bd929
Add tests for structure keymap and hint that not all keys will work a…
sirkrypt0 758f30f
Minor styling fix
sirkrypt0 737fc6a
Use more cascades
sirkrypt0 e9983a8
Rename resources category to running
sirkrypt0 017b9c4
Merge branch 'dev' into feature/keymap-preference
sirkrypt0 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
4 changes: 4 additions & 0 deletions
4
packages/RichTextEditing-Core.package/RichTextEditor.class/class/structureKeymap..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
accessing | ||
structureKeymap: aString | ||
|
||
structureKeymap := aString |
10 changes: 7 additions & 3 deletions
10
packages/RichTextEditing-Core.package/RichTextEditor.class/class/structureKeymap.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,8 @@ | ||
instance creation | ||
accessing | ||
structureKeymap | ||
"adjust this to your keyboard layout" | ||
^ '!@#$%^&*()' | ||
<preference: 'Structure keyboard shortcuts' | ||
category: #SquidWord | ||
description: 'Represents the keys to use with CTRL+SHIFT to toggle structures. Character at position 1 represents toggling structure 1. Leave as is if you use an american keyboard layout, otherwise change e.g. to pressing shift and all numbers 1 to 0 on your keyboard. Be aware that not all shortcuts might work as they might already be reserved by Squeak.' | ||
type: #String> | ||
|
||
^ structureKeymap ifNil: ['!@#$%^&*()'] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
packages/RichTextEditing-Core.package/RichTextEditor.class/properties.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 4 additions & 0 deletions
4
...RichTextEditing-Tests.package/RichTextEditorTests.class/instance/changeStructureKeymap.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
utilities | ||
changeStructureKeymap | ||
|
||
self textEditor class structureKeymap: self newStructureKeymap |
4 changes: 4 additions & 0 deletions
4
...RichTextEditing-Tests.package/RichTextEditorTests.class/instance/editorStructureKeymap.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
utilities | ||
editorStructureKeymap | ||
|
||
^ self textEditor class structureKeymap |
4 changes: 4 additions & 0 deletions
4
...es/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/newStructureKeymap.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
constants | ||
newStructureKeymap | ||
|
||
^ '$=)(/&%§"!' |
5 changes: 5 additions & 0 deletions
5
packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/setUp.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
resources | ||
setUp | ||
|
||
super setUp. | ||
self structureKeymap: self editorStructureKeymap |
4 changes: 4 additions & 0 deletions
4
...ages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/structureKeymap..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
accessing | ||
structureKeymap: aString | ||
|
||
structureKeymap := aString |
4 changes: 4 additions & 0 deletions
4
packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/structureKeymap.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
accessing | ||
structureKeymap | ||
|
||
^ structureKeymap |
4 changes: 4 additions & 0 deletions
4
...TextEditing-Tests.package/RichTextEditorTests.class/instance/structureKeymapPreference.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
constants | ||
structureKeymapPreference | ||
|
||
^ (self textEditor class asString , '>>', 'structureKeymap') asSymbol | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What's that? |
5 changes: 5 additions & 0 deletions
5
packages/RichTextEditing-Tests.package/RichTextEditorTests.class/instance/tearDown.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
resources | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. running |
||
tearDown | ||
|
||
self textEditor class structureKeymap: self structureKeymap. | ||
super tearDown |
6 changes: 6 additions & 0 deletions
6
...diting-Tests.package/RichTextEditorTests.class/instance/testUS183ChangeStructureKeymap.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
acceptance-tests | ||
testUS183ChangeStructureKeymap | ||
|
||
Preferences setFlag: self structureKeymapPreference | ||
toValue: self newStructureKeymap | ||
during: [self assert: self editorStructureKeymap = self newStructureKeymap] |
10 changes: 10 additions & 0 deletions
10
...e/RichTextEditorTests.class/instance/testUS183ChangedStructureKeymapAllowsNewShortcuts.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
acceptance-tests | ||
testUS183ChangedStructureKeymapAllowsNewShortcuts | ||
|
||
self | ||
changeStructureKeymap; | ||
enterStringOntoTextField: self text. | ||
self textEditor selectAll. | ||
self | ||
simulateKeyboardShortcutForStructure1; | ||
assert: self textIsBold |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change to running