NotepadNext icon indicating copy to clipboard operation
NotepadNext copied to clipboard

Alt(Option) shortcuts overlap with characters on macOS

Open Sylphe88 opened this issue 1 year ago • 8 comments

Operating System and Version

macOS Sonoma

Distribution

installer (brew) - 0.8

Description

Not sure if feature request or bug, but I can't type some characters because they're behind the Alt/option modifier. So basically on my french keyboard, I can't type the "[" character (Option+Shift+() because it corresponds to an Unfold shortcut.

One solution would be to be able to change the shortcut mappings but I could not find a way to do this.

Steps to Reproduce

  1. Have a macOS setup with a french keyboard layout
  2. Try typing a square bracket. Does not work!

Additional Details

e.g. screenshots, logs, etc

Sylphe88 avatar Nov 20 '24 08:11 Sylphe88

Probably sounds like a bug but cannot say for sure. Might be Qt related or something in the application. I don't have a Mac at all so I don't have a good way to debug it unfortunately.

There is a mostly undocumented feature to override shortcuts that are interfering (e.g. the Unfold shortcut). Adding a [Shortcuts] section in the ini file (not sure where that is on MacOS) will override the default shortcuts (do not edit the file with Notepad Next). For example:

[Shortcuts]
New=Ctrl+F1

If you look through this file you'll see action names such as "actionUnfoldAll" so for example you could use:

[Shortcuts]
UnfoldAll=

And that would remove the shortcut.

dail8859 avatar Nov 20 '24 12:11 dail8859

Spent some time looking for this ini file but I can't find it anywhere. Any environment variable / standard path on Windows I can relate to? The closest I could find was /Users/<myname>/Library/Application Support/NotepadNext but it only contains session history (unsaved files)

Sylphe88 avatar Nov 21 '24 17:11 Sylphe88

On Windows the ini file is stored in %APPDATA%/NotepadNext which is the same location that stores the session file. So I would have assumed it is close to there.

Though I'm using the generic QSettings class so maybe it stores it differently than I'm expecting. As a last guess I'd check here $HOME/.config/NotepadNext/NotepadNext.ini

dail8859 avatar Nov 22 '24 20:11 dail8859

I had the same issue (but with swedish keyboard layout) and your solution @dail8859 to remove the shortcuts worked.

The ini file was located here on MacOS: /Users/USERNAME/.config/NotepadNext/NotepadNext.ini

EliasNilssonCLI avatar Feb 11 '25 13:02 EliasNilssonCLI

Good call @EliasNilssonCLI, this works (FoldLevelN or UnfolLevelN to release most shortcuts) To be honest I gave up and been using Sublime but I might come back to NotepadNext :) I guess we can close, but it would deserve some additional documentation maybe @dail8859 ?

Sylphe88 avatar Feb 11 '25 16:02 Sylphe88

To be honest there's quite a few 'undocumented' features that should probably be better documented :) The solution I provided is a work around for (likely) a Qt issue. I'm fine leaving this open as it would be nice if someone was able to determine the root issue.

dail8859 avatar Feb 11 '25 17:02 dail8859

I'm also experiencing the same issue on my MacOS device with a Turkish keyboard. The characters { [ ] } typed using the ALT + 7 8 9 0 shortcuts cannot be used in Notepad Next. I applied the suggested change in the NotePadNext.ini file, but it didn't resolve the issue. Do you have a different suggestion?

saracmert avatar May 14 '25 13:05 saracmert

@saracmert To solve the issue for myself I had to add all of the lines below to the .ini file, but you might have already done so.

[Shortcuts] FoldAll= FoldLevel1= FoldLevel2= FoldLevel3= FoldLevel4= FoldLevel5= FoldLevel6= FoldLevel7= FoldLevel8= FoldLevel9= UnfoldAll= UnfoldLevel1= UnfoldLevel2= UnfoldLevel3= UnfoldLevel4= UnfoldLevel5= UnfoldLevel6= UnfoldLevel7= UnfoldLevel8= UnfoldLevel9=

EliasNilssonCLI avatar May 15 '25 05:05 EliasNilssonCLI