Using ember-keyboard with ember-paper

Hi,

We using ember-paper for our UI and currently I search an good addon to use keyboard shortcuts. Therefore I test the addon “ember-keyboard” ( ember-keyboard - npm ) but the problem here is the using of the addon within “intputs” or “textareas” because ember-paper do not use the ember input/textarea components. Ember paper renders native html like this:

<input ...... />
<textarea ...... />...</textarea>

The problem is that my defined route events are also active in a input field with focus.

EDIT: Same problem by using the “ember-keyboard-shortcuts” addon. I don’t know what I have to do to use a route shortcut like “h” in my application which is not active within a focused input field.

Greetings, Mario

1 Like

Problem solved by this solution:

import EmberPaperInput from 'ember-paper/components/paper-input';
import { EKMixin, EKFirstResponderOnFocusMixin } from 'ember-keyboard';

export function initialize(/* application */) {
    EmberPaperInput.reopen(EKMixin, EKFirstResponderOnFocusMixin);
}

export default {
    name: 'ember-keyboard-inputs',
    initialize: initialize
};

Best regards, Mario