MCPcopy Create free account
hub / github.com/devforth/painterro / handleKeyDown

Method handleKeyDown

js/colorPicker.js:168–177  ·  view source on GitHub ↗
(event)

Source from the content-addressed store, hash-verified

166 }
167
168 handleKeyDown(event) {
169 if (this.opened && event.keyCode === KEYS.enter) {
170 return true; // mark as handled - user might expect doing save by enter
171 }
172 if (this.opened && event.keyCode === KEYS.esc) {
173 this.close();
174 return true;
175 }
176 return false;
177 }
178
179 handleMouseDown(e) {
180 if (this.choosing && e.button !== 2) { // 0 - m1, 1 middle, 2-m2

Callers

nothing calls this directly

Calls 1

closeMethod · 0.95

Tested by

no test coverage detected