File tree Expand file tree Collapse file tree 3 files changed +10
-6
lines changed Expand file tree Collapse file tree 3 files changed +10
-6
lines changed Original file line number Diff line number Diff line change 1
1
# Obsidian Scroll Editor Plugin
2
2
3
- This plugin adds scroll commands for Obsidian editor.
3
+ This plugin adds scroll commands for the Obsidian editor.
4
4
5
- The plugin adds ` scroll-up ` and ` scroll-down ` commands to the editor. Assign hotkeys to this commands to
5
+ The plugin adds ` scroll-up ` and ` scroll-down ` commands to the editor. Assign hotkeys to these commands to
6
6
scroll the editor view.
7
7
8
8
![ Editor Scroll Commands] ( media/editor-scroll-commands.png " Editor Scroll Commands ")
9
9
10
10
The commands itself do nothing, so use the hotkeys to scroll the editor.
11
11
12
+ ![ Editor Scroll Commands Hotkeys] ( media/editor-scroll-commands-hotkeys.png " Editor Scroll Commands Hotkeys ")
13
+
12
14
The settings allow you to change the scroll offset and the interval.
13
15
14
16
![ Editor Scroll Commands Settings] ( media/editor-scroll-commands-settings.png " Editor Scroll Commands Settings ")
15
17
16
- ## How to use
18
+ ## Development
17
19
18
20
- Clone this repo.
19
21
- Make sure your NodeJS is at least v16 (` node --version ` ).
@@ -22,5 +24,6 @@ The settings allow you to change the scroll offset and the interval.
22
24
23
25
## Manually installing the plugin
24
26
25
- - Copy over ` main.js ` , ` manifest.json ` to your vault ` VaultFolder/.obsidian/plugins/your-plugin-id / ` .
27
+ - Copy over ` main.js ` , ` manifest.json ` to your vault ` VaultFolder/.obsidian/plugins/obsidian-editor-scroll-commands / ` .
26
28
29
+ See ![ latest release] ( https://github.com/PhoSor/obsidian-editor-scroll-commands/releases/latest ) in ** Releases** section.
Original file line number Diff line number Diff line change @@ -61,8 +61,9 @@ export default class EditorScrollCommandsPlugin extends Plugin {
61
61
62
62
isScrollHotkeyEvent ( event : KeyboardEvent , hotkeys : Hotkey [ ] ) {
63
63
return hotkeys . some ( ( hotkey : Hotkey ) => {
64
- let keyMatched = ( hotkey . key . toUpperCase ( ) == event . key . toUpperCase ( )
65
- ? true : false ) ;
64
+ let keyMatched =
65
+ ( hotkey . key == event . code ) ||
66
+ ( 'Key' + hotkey . key == event . code ) ;
66
67
67
68
let allModsMatched = hotkey . modifiers . every ( m => {
68
69
let propName = ModToEventProp [ m ] ;
You can’t perform that action at this time.
0 commit comments