Mottie / Keyboard

Virtual Keyboard using jQuery ~
http://mottie.github.io/Keyboard/
Other
1.78k stars 723 forks source link

Physical shift key doesn't trigger virtual shift #683

Closed CodeSmith32 closed 6 years ago

CodeSmith32 commented 6 years ago

I just updated to the newest version (v1.28.4), and I've noticed that pressing the physical shift key on my keyboard no longer triggers the virtual key to highlight, and, in turn, switch the keyboard.

Is this a bug? Or maybe something I'm doing wrong?

Here's my option config:

$elem.keyboard({
    layout: "custom",
    customLayout: {
        'default': [
            '` 1 2 3 4 5 6 7 8 9 0 - = {bksp}',
            '@ q w e r t y u i o p [ ] \\',
            'a s d f g h j k l ; \' {enter}',
            '{shift} z x c v b n m , . / ',
            ' {space} '
        ],
        'shift': [
            '~ ! @ # $ % ^ & * ( ) _ + {bksp}',
            '@ Q W E R T Y U I O P { } |',
            'A S D F G H J K L : " {enter}',
            '{shift} Z X C V B N M < > ? ',
            ' {space} '
        ]
    },
    display: {
        bksp: "\u232b",
        shift: "\u21e7Shift"
    },
    css: {
        input: 'ui-widget-content'
    },
    autoAccept: true,
    usePreview: false,
    change: change,
    accept: accept
});

function change() { ... }
function accept() { ... }
Mottie commented 6 years ago

Hi @CodeSmith32!

The physical shift key will only change the virtual keyboard keyset if the typing extension is included. See this demo.

If that isn't the case, please modify the demo to show the issue being described.

CodeSmith32 commented 6 years ago

Oh! Whoops. Got it.

Works fine now.

Thanks for the demo, and clarification!