diff --git a/HISTORY.md b/HISTORY.md index a0227196..1e4bf53e 100755 --- a/HISTORY.md +++ b/HISTORY.md @@ -78,6 +78,9 @@ * German * French +### 2019-05-20 +* Objects, Blocks added plus- and minus- keys to key pressed predicate and hat block + ### 2019-05-16 * Objects: more refactoring to generalize projection extensions diff --git a/snap.html b/snap.html index 686d73e1..417f9df1 100755 --- a/snap.html +++ b/snap.html @@ -6,9 +6,9 @@ - + - + diff --git a/src/blocks.js b/src/blocks.js index 131caf64..e75473fd 100644 --- a/src/blocks.js +++ b/src/blocks.js @@ -148,7 +148,7 @@ CustomCommandBlockMorph, SymbolMorph, ToggleButtonMorph, DialMorph*/ // Global stuff //////////////////////////////////////////////////////// -modules.blocks = '2019-May-08'; +modules.blocks = '2019-May-20'; var SyntaxElementMorph; var BlockMorph; @@ -1255,6 +1255,8 @@ SyntaxElementMorph.prototype.labelPart = function (spec) { 'right arrow': ['right arrow'], 'left arrow': ['left arrow'], space : ['space'], + '+' : ['+'], + '-' : ['-'], a : ['a'], b : ['b'], c : ['c'], diff --git a/src/objects.js b/src/objects.js index ff7b2110..e27724d4 100644 --- a/src/objects.js +++ b/src/objects.js @@ -84,7 +84,7 @@ BlockEditorMorph, BlockDialogMorph, PrototypeHatBlockMorph, localize, TableMorph, TableFrameMorph, normalizeCanvas, BooleanSlotMorph, HandleMorph, AlignmentMorph, Process, XML_Element, VectorPaintEditorMorph*/ -modules.objects = '2019-May-16'; +modules.objects = '2019-May-20'; var SpriteMorph; var StageMorph; @@ -7665,6 +7665,12 @@ StageMorph.prototype.processKeyEvent = function (event, action) { case 40: keyName = 'down arrow'; break; + case 187: + keyName = '+'; + break; + case 189: + keyName = '-'; + break; default: keyName = String.fromCharCode(event.keyCode || event.charCode); if (event.ctrlKey || event.metaKey) {