Set the device's physical location, e.g. `usb-00:01.2-2.1/input0`.
(self, path: &CStr)
| 65 | |
| 66 | /// Set the device's physical location, e.g. `usb-00:01.2-2.1/input0`. |
| 67 | pub fn with_phys(self, path: &CStr) -> io::Result<Self> { |
| 68 | unsafe { |
| 69 | sys::ui_set_phys(self.fd.as_raw_fd(), path.as_ptr())?; |
| 70 | } |
| 71 | Ok(self) |
| 72 | } |
| 73 | |
| 74 | /// Set the key codes that can be emitted by this device. |
| 75 | pub fn with_keys(self, keys: &AttributeSetRef<KeyCode>) -> io::Result<Self> { |