diff --git a/src/renderer/Editor.css b/src/renderer/Editor.css index f0bcb58..de2fcc0 100644 --- a/src/renderer/Editor.css +++ b/src/renderer/Editor.css @@ -17,9 +17,40 @@ font-style: italic; } .Editor-ace-wrapper { + position: relative; flex-grow: 1; user-select: auto; } +.Editor-kbctrl-overlay { + display: none; + position: absolute; + background-color: #0005; + user-select: none; + width: 100%; + height: 100%; + z-index: 5; + font-family: Arial, sans-serif; + font-weight: bold; + align-items: center; + justify-content: center; + padding: auto; + color: white; +} +.Editor-kbctrl-enabled .Editor-kbctrl-overlay { + display: flex; +} +.Editor-kbctrl-enabled .Editor-ace-wrapper { + user-select: none; +} +.Editor-kbctrl-enabled .ace_cursor { + opacity: 0; +} +.Editor-kbctrl-enabled .ace_scrollbar-v { + overflow: hidden; +} +.Editor-kbctrl-enabled .ace_scrollbar-h { + overflow: hidden; +} .Editor-toolbar { display: flex; flex-direction: row; diff --git a/src/renderer/Editor.tsx b/src/renderer/Editor.tsx index 07a70e9..d64aa5f 100644 --- a/src/renderer/Editor.tsx +++ b/src/renderer/Editor.tsx @@ -131,7 +131,12 @@ export default function Editor({ }; return ( -