import { onKeyboardWillShow, scanCode } from '@ray-js/ray'
// Register the keyboard show 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, triggering onKeyboardWillShow.
onKeyboardWillShow(e => {
console.log("[onKeyboardWillShow]", e);
});
scanCode({
onlyFromCamera: false,
isShowKeyboard: true,
keyboardBean: { title: "Keyboard input" },
success: data => {
console.log(data);
},
fail: error => {
console.error(error);
},
});