import { onKeyboardHeightChange, scanCode } from '@ray-js/ray'
// Register the keyboard height change event and use scanCode's keyboard input mode to bring up the system keyboard.
// Passing isShowKeyboard: true to scanCode provides a "Keyboard input" entry on the scan page; after entering, the input field auto-focuses to show the system keyboard, and keyboard height changes trigger onKeyboardHeightChange.
onKeyboardHeightChange(e => {
console.log("[onKeyboardHeightChange]", e);
});
scanCode({
onlyFromCamera: false,
isShowKeyboard: true,
keyboardBean: { title: "Keyboard input" },
success: data => {
console.log(data);
},
fail: error => {
console.error(error);
},
});