import { onKeyboardWillHide, scanCode } from '@ray-js/ray'
// Register the keyboard hide event and use scanCode's keyboard input mode to bring up and then hide the system keyboard.
// Passing isShowKeyboard: true: after entering the keyboard input page, the keyboard pops up automatically; tapping Back/Cancel to exit the input page hides the keyboard, triggering onKeyboardWillHide.
onKeyboardWillHide(e => {
console.log("[onKeyboardWillHide]", e);
});
scanCode({
onlyFromCamera: false,
isShowKeyboard: true,
keyboardBean: { title: "Keyboard input" },
success: data => {
console.log(data);
},
fail: error => {
console.error(error);
},
});