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 11# Obsidian Scroll Editor Plugin
22
3- This plugin adds scroll commands for Obsidian editor.
3+ This plugin adds scroll commands for the Obsidian editor.
44
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
66scroll the editor view.
77
88![ Editor Scroll Commands] ( media/editor-scroll-commands.png " Editor Scroll Commands ")
99
1010The commands itself do nothing, so use the hotkeys to scroll the editor.
1111
12+ ![ Editor Scroll Commands Hotkeys] ( media/editor-scroll-commands-hotkeys.png " Editor Scroll Commands Hotkeys ")
13+
1214The settings allow you to change the scroll offset and the interval.
1315
1416![ Editor Scroll Commands Settings] ( media/editor-scroll-commands-settings.png " Editor Scroll Commands Settings ")
1517
16- ## How to use
18+ ## Development
1719
1820- Clone this repo.
1921- 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.
2224
2325## Manually installing the plugin
2426
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 / ` .
2628
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 {
6161
6262 isScrollHotkeyEvent ( event : KeyboardEvent , hotkeys : Hotkey [ ] ) {
6363 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 ) ;
6667
6768 let allModsMatched = hotkey . modifiers . every ( m => {
6869 let propName = ModToEventProp [ m ] ;
You can’t perform that action at this time.
0 commit comments