API: Return Input From Keyboard Wedge Device
Receive data from keyboard wedge devices, such as keyboards & scanners. These types of peripherals can connect via Bluetooth or USB.
A keyboard wedge device uses the iPad's native connection for keyboards to emulate keyboard input. This means that while the device is directly connected to the iPad, no on-screen keyboard will be shown when an input field is focused. As a result, we do not recommend using this type of device for projects where visitors would need access to the on-screen keyboard. Use of these devices can also interfere with other types of inputs (for example, drop-down menus).
- Sample code to run within the app and download for integration into your own project is available here.
- App Settings
- iOS/iPadOS Permissions
- Bluetooth (if your device connects via Bluetooth) - more on enabling specific iOS/iPadOS permissions here
Triggers via API Functions
This function starts requesting data from the connected keyboard wedge device. When triggered, an alert will appear requesting data input.
kp_BluetoothBarcodeScanner_requestAcceptingData(alertTitle, alertMessage, duration);
Silently Request Data
This function starts requesting data from the connected keyboard wedge device. No alert will appear when triggered.
Notifications via API Callbacks
When Data is Returned
This callback triggers when data is successfully returned from the device.
When Data Fails to Return
This callback triggers when data fails to return due to an error.
When Data Request Timeout Occurs
This callback is triggered after the timeout period defined as a parameter in kp_BluetoothBarcodeScanner_requestAcceptingData if no data has been successfully returned by the device.
When Data Request is Cancelled
This callback is triggered when a data request from kp_BluetoothBarcodeScanner_requestAcceptingData is cancelled by the visitor.
- Added in version 3.3. Updated in 10.0 to include support for keyboard wedge devices other than Bluetooth scanners.