From 7f8c78c9f36a3c469fcea9a3abdba48540759943 Mon Sep 17 00:00:00 2001 From: Devin Jean Date: Wed, 12 Oct 2022 22:00:17 -0500 Subject: [PATCH] Keys Menu Fix (#1337) * fix keys dropdown menu * revery snap merge --- src/blocks.js | 56 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) diff --git a/src/blocks.js b/src/blocks.js index 4b4b05838d..764650a365 100644 --- a/src/blocks.js +++ b/src/blocks.js @@ -9356,6 +9356,62 @@ InputSlotMorph.prototype.rpcActions = function () { return dict; }; + +// InputSlotMorph special drop-down menus: +// Note each function returning a drop-down menu +// must accept a Boolean parameter enabling its +// access for searching + +InputSlotMorph.prototype.keysMenu = function () { + return { + 'any key' : ['any key'], + 'up arrow': ['up arrow'], + 'down arrow': ['down arrow'], + 'right arrow': ['right arrow'], + 'left arrow': ['left arrow'], + enter: ['enter'], + space : ['space'], + '+' : ['+'], + '-' : ['-'], + a : ['a'], + b : ['b'], + c : ['c'], + d : ['d'], + e : ['e'], + f : ['f'], + g : ['g'], + h : ['h'], + i : ['i'], + j : ['j'], + k : ['k'], + l : ['l'], + m : ['m'], + n : ['n'], + o : ['o'], + p : ['p'], + q : ['q'], + r : ['r'], + s : ['s'], + t : ['t'], + u : ['u'], + v : ['v'], + w : ['w'], + x : ['x'], + y : ['y'], + z : ['z'], + '0' : ['0'], + '1' : ['1'], + '2' : ['2'], + '3' : ['3'], + '4' : ['4'], + '5' : ['5'], + '6' : ['6'], + '7' : ['7'], + '8' : ['8'], + '9' : ['9'] + }; +}; + InputSlotMorph.prototype.messagesMenu = function () { var dict = {}, rcvr = this.parentThatIsA(BlockMorph).scriptTarget(),