feat(desktop): built-in Han/Eng layout auto-switching, terminal/Vim support, and Unicode input
This commit is contained in:
parent
1da04b9e46
commit
a3ac44da2b
109 changed files with 8234 additions and 242 deletions
|
|
@ -4,6 +4,7 @@
|
|||
|
||||
import type { Key as NutKey } from '@nut-tree-fork/nut-js'
|
||||
import { getLogger } from '../LoggerService'
|
||||
import { sendWin32UnicodeText } from '../../utils/win32-unicode-input'
|
||||
import { D3ROError, ErrorCode } from '@d3ro/core/errors'
|
||||
|
||||
const logger = getLogger('TextInsertService')
|
||||
|
|
@ -99,6 +100,9 @@ export class NutKeyboardPort implements KeyboardPort {
|
|||
/** 텍스트 전체를 네이티브 호출 한 번으로 타이핑한다 (글자 사이 JS 대기 없음). */
|
||||
async type(text: string): Promise<void> {
|
||||
if (!text) return
|
||||
if (this._platform === 'win32' && this._load === loadNutModule && sendWin32UnicodeText(text)) {
|
||||
return
|
||||
}
|
||||
const nut = await this._ensureNut()
|
||||
await nut.native.type(text)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue