diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/shared/utils/keys.test.js | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/shared/utils/keys.test.js b/test/shared/utils/keys.test.js index 77e2b12..5ca8b54 100644 --- a/test/shared/utils/keys.test.js +++ b/test/shared/utils/keys.test.js @@ -24,6 +24,18 @@ describe("keys util", () => { expect(k.altKey).to.be.false; expect(k.metaKey).to.be.true; }); + + it('returns from keyboard input Ctrl+$', () => { + // $ required shift pressing on most keyboards + let k = keys.fromKeyboardEvent({ + key: '$', shiftKey: true, ctrlKey: true, altKey: false, metaKey: false + }); + expect(k.key).to.equal('$'); + expect(k.shiftKey).to.be.false; + expect(k.ctrlKey).to.be.true; + expect(k.altKey).to.be.false; + expect(k.metaKey).to.be.false; + }); }); describe('fromMapKey', () => { |