p5.js-web-editor icon indicating copy to clipboard operation
p5.js-web-editor copied to clipboard

Update the keyboard shortcuts based on user preferences

Open karanBRAVO opened this issue 10 months ago • 2 comments

Increasing Access

Like in most of the editor(s), users can change the keymaps based on their preferences. There should also be a feature to in p5.js-web-editor to change the keyboard shortcuts as user likes.

Feature request details

  1. Add a edit button
  2. create context or redux slice for global state(s) mgmt
  3. track the keys using onKeyDown or onKeyUp, etc.
  4. Also ensure that shortcut don't clash with browser shortcuts

karanBRAVO avatar Apr 10 '25 18:04 karanBRAVO

I have added the PR to check the feasibility of this feature.

karanBRAVO avatar Apr 10 '25 18:04 karanBRAVO

Thanks for opening this @karanBRAVO, I think the idea is interesting!

Before adding new features, we generally like to gain some sort of discussion or consensus first among a few folks before starting developing on it. However, since you already have something down, I think it'd be great if you could share some screenshots or videos (either in the PR or here in this issue) of how it functions!

One note I might add though is that we're currently in the process of refactoring the Editor component for the CodeMirror 6 upgrade. You can reference the changes here to see what the component looks like so far. Since we're planning to integrate and work with these changes first, I might suggest waiting until that work is done before revisiting this feature.

raclim avatar Apr 10 '25 18:04 raclim