Allow delete key without modifier as shortcut for deleting

(closes #3455)

Also fixed a minor bug in `iD.uiCmd` that was causing keyboard shortcuts
like '⌘⌫' to convert to 'Ctrl+Backspace+'  (note extra trailing '+')
It affected only the tooltip display, not the key event binding.
This commit is contained in:
Bryan Housel
2016-10-24 23:57:44 -04:00
parent 8785cbc3bf
commit e83b2ea2be
3 changed files with 4 additions and 2 deletions

View File

@@ -35,6 +35,7 @@ describe('iD.uiCmd', function () {
it('changes keys to linux versions', function () {
ua = 'Linux';
iD.Detect(true); // force redetection
expect(iD.uiCmd('⌘⌫')).to.eql('Ctrl+Backspace');
expect(iD.uiCmd('⌘A')).to.eql('Ctrl+A');
expect(iD.uiCmd('⇧A')).to.eql('Shift+A');
expect(iD.uiCmd('⌘⇧A')).to.eql('Ctrl+Shift+A');
@@ -44,6 +45,7 @@ describe('iD.uiCmd', function () {
it('changes keys to win versions', function () {
ua = 'Win';
iD.Detect(true); // force redetection
expect(iD.uiCmd('⌘⌫')).to.eql('Ctrl+Backspace');
expect(iD.uiCmd('⌘A')).to.eql('Ctrl+A');
expect(iD.uiCmd('⇧A')).to.eql('Shift+A');
expect(iD.uiCmd('⌘⇧A')).to.eql('Ctrl+Shift+A');