diff options
-rw-r--r-- | app/src/Keyboard/Keyboard.js | 2 | ||||
-rw-r--r-- | app/src/Keyboard/Keys/Key.js | 8 |
2 files changed, 3 insertions, 7 deletions
diff --git a/app/src/Keyboard/Keyboard.js b/app/src/Keyboard/Keyboard.js index 065072f..b1df7fa 100644 --- a/app/src/Keyboard/Keyboard.js +++ b/app/src/Keyboard/Keyboard.js @@ -138,7 +138,7 @@ function Keyboard(props) { onRenameLayer={handleRenameLayer} onDeleteLayer={handleDeleteLayer} /> - <SearchContext.Provider value={{ getSearchTargets }}> + <SearchContext.Provider value={{ getSearchTargets, sources }}> <div style={getWrapperStyle()}> {isReady() && ( <KeyboardLayout diff --git a/app/src/Keyboard/Keys/Key.js b/app/src/Keyboard/Keys/Key.js index 7374eab..8f4928e 100644 --- a/app/src/Keyboard/Keys/Key.js +++ b/app/src/Keyboard/Keys/Key.js @@ -64,14 +64,10 @@ function createPromptMessage(param) { } export default function Key(props) { - const { keycodes, behaviours } = useContext(DefinitionsContext) - const { getSearchTargets } = useContext(SearchContext) + const { behaviours } = useContext(DefinitionsContext) + const { getSearchTargets, sources } = useContext(SearchContext) const { position, rotation, size } = props const { label, value, params, onUpdate } = props - const sources = { - behaviours: behaviours.indexed, - code: keycodes.indexed - } const [editing, setEditing] = useState(null) const bind = value |