From 3907116328cfc84b41c2b4078511ba540bf0ed4c Mon Sep 17 00:00:00 2001 From: tophf Date: Tue, 5 Apr 2022 13:26:05 +0300 Subject: [PATCH] getEventKeyName: uppercase for single letters --- js/dom.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/js/dom.js b/js/dom.js index 308d847b..77b19290 100644 --- a/js/dom.js +++ b/js/dom.js @@ -243,7 +243,9 @@ function getEventKeyName(e, letterAsCode) { mods === e.key + '-' ? '' : mods }${ e.key - ? e.key.length === 1 && letterAsCode ? e.code : e.key + ? !e.key[1] && letterAsCode ? e.code // KeyC + : e.key[1] ? e.key // Esc + : e.key.toUpperCase() // C, Shift-C (single letters we use uppercase for consistency) : 'Mouse' + ('LMR'[e.button] || e.button) }`; }