MCPcopy Create free account
hub / github.com/NativeScript/SimDeck / send_key

Method send_key

packages/server/src/native/bridge.rs:663–672  ·  view source on GitHub ↗
(&self, udid: &str, key_code: u16, modifiers: u32)

Source from the content-addressed store, hash-verified

661 }
662
663 pub fn send_key(&self, udid: &str, key_code: u16, modifiers: u32) -> Result<(), AppError> {
664 let udid = CString::new(udid).map_err(|e| AppError::bad_request(e.to_string()))?;
665 unsafe {
666 let mut error = ptr::null_mut();
667 bool_result(
668 ffi::xcw_native_send_key(udid.as_ptr(), key_code, modifiers, &mut error),
669 error,
670 )
671 }
672 }
673
674 pub fn press_home(&self, udid: &str) -> Result<(), AppError> {
675 let udid = CString::new(udid).map_err(|e| AppError::bad_request(e.to_string()))?;

Callers 7

run_batch_stepFunction · 0.45
run_batch_stepFunction · 0.45
press_tvos_remote_keyFunction · 0.45
run_control_messageFunction · 0.45
run_tvos_control_messageFunction · 0.45

Calls 4

bool_resultFunction · 0.85
xcw_native_send_keyFunction · 0.85

Tested by

no test coverage detected