diff options
author | Shin'ya Ueoka <ueokande@i-beam.org> | 2017-10-08 09:24:09 +0900 |
---|---|---|
committer | Shin'ya Ueoka <ueokande@i-beam.org> | 2017-10-08 09:54:15 +0900 |
commit | 6f9b217df86c72ba5c8187cc192f90639488cee3 (patch) | |
tree | d312cc956fdb8dbe6c98c0ab3a810262329a2a38 /src/content | |
parent | 944683a2d8f9a165c490d05c350fdc689bdb6c85 (diff) |
make content-input more simple
Diffstat (limited to 'src/content')
-rw-r--r-- | src/content/index.js | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/content/index.js b/src/content/index.js index 2c13c70..ad891ca 100644 --- a/src/content/index.js +++ b/src/content/index.js @@ -3,6 +3,7 @@ import * as consoleFrames from './console-frames'; import * as settingActions from 'actions/setting'; import { createStore } from 'store'; import ContentInputComponent from 'components/content-input'; +import KeymapperComponent from 'components/keymapper'; import FollowComponent from 'components/follow'; import reducers from 'reducers'; import messages from './messages'; @@ -11,6 +12,10 @@ const store = createStore(reducers); const followComponent = new FollowComponent(window.document.body, store); const contentInputComponent = new ContentInputComponent(window.document.body, store); +const keymapperComponent = new KeymapperComponent(store); +contentInputComponent.onKey((key, ctrl) => { + return keymapperComponent.key(key, ctrl); +}); store.subscribe(() => { try { followComponent.update(); |