From 5ebf23828269ae4999864d85975dfec5fd8ac534 Mon Sep 17 00:00:00 2001 From: ChenX Date: Tue, 25 Sep 2018 15:58:20 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BD=93=E7=94=A8=E6=88=B7=E6=8C=89=E4=B8=8B?= =?UTF-8?q?=E6=8C=89=E9=94=AE=E6=97=B6,=E5=AF=B9=E5=85=B3=E9=94=AE?= =?UTF-8?q?=E5=AD=97=E7=95=8C=E9=9D=A2=E8=BF=9B=E8=A1=8C=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E6=9B=B4=E6=96=B0.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Editor/GetKeyWordService.tsx | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/Editor/GetKeyWordService.tsx b/src/Editor/GetKeyWordService.tsx index 288297ece..615a6673a 100644 --- a/src/Editor/GetKeyWordService.tsx +++ b/src/Editor/GetKeyWordService.tsx @@ -56,6 +56,20 @@ export class GetKeyWordsServices implements EditorService , container); + + end(ed.m_KeyCtrl, ed.m_KeyCtrl.OnKeyDown, (e: KeyboardEvent) => + { + if (this.IsReady) + { + let key = e.key.toUpperCase(); + let index = this.keywordList.findIndex((v) => + { + return v.key === key; + }); + if (index !== -1) + this.selctIndex = index; + } + }); } async Doit(e: MouseEvent)