Fix shortcut with Shift + letter

This commit is contained in:
1024jp 2022-02-09 23:11:31 +09:00
parent 4ca9a6e06c
commit 17ecaf88f6
4 changed files with 5 additions and 1 deletions

View File

@ -51,6 +51,7 @@ Change Log
- Fix an issue that the slider in the editor opacity toolbar item did not work when collapsed.
- Fix an issue that the editor's opacity change did not apply immediately.
- Fix an issue that some uncustomizable menu commands were provided in the Key Bindings preference pane.
- Fix an issue in the snippet key bindings that shortcuts with only Shift key for modifier keys were accepted though does not work correctly.
- Fix an issue that some help buttons did not work (thanks to Alex Newson!).
- Fix and minor update on localized strings.
- Fix `cot` command to work also with Python 3.

View File

@ -81,6 +81,7 @@
<li>Fix an issue that the slider in the editor opacity toolbar item did not work when collapsed.</li>
<li>Fix an issue that the editor's opacity change did not apply immediately.</li>
<li>Fix an issue that some uncustomizable menu commands were provided in the Key Bindings preference pane.</li>
<li>Fix an issue in the snippet key bindings that shortcuts with only Shift key for modifier keys were accepted though does not work correctly.</li>
<li>Fix an issue that some help buttons did not work (thanks to Alex Newson!).</li>
<li>Fix and minor update on localized strings.</li>
<li>Fix <code>cot</code> command to work also with Python 3.</li>

View File

@ -80,6 +80,7 @@
<li>ロックされた書類を編集しようとしたときに複製を促すダイアログが特定の条件下でその後も繰り返し表示されることがあった不具合を修正</li>
<li>ツールバー項目が折り畳まれているとエディタの不透明度のスライダが機能していなかった不具合を修正</li>
<li>キーバインド設定にカスタマイズ不可能なメニューコマンドが含まれていた不具合を修正</li>
<li>Shiftキーのみを修飾キーとするショートカットが実際には正しく機能しないにも関わらず登録できたスニペットキーバインディングの不具合を修正</li>
<li>エディタの不透明度の変更がすぐに反映されなかった不具合を修正</li>
<li>いくつかのヘルプボタンが機能していなかった不具合を修正Alex Newsonさんに感謝</li>
<li>ローカライズ表現の修正と調整</li>

View File

@ -108,7 +108,8 @@ final class SnippetKeyBindingManager: KeyBindingManager {
}
// avoid shift-only modifier with a letter
if shortcut.modifierMask == .shift, shortcut.keySpecChars.allSatisfy(\.isLetter) {
// -> typing Shift + letter inserting a uppercase letter instead of invoking a shortcut
if shortcut.modifierMask == .shift, shortcut.keyEquivalent.contains(where: \.isLetter) {
throw InvalidKeySpecCharactersError(kind: .shiftOnlyModifier, shortcut: shortcut)
}
}