// ---------------------------------------------------------------------- bool ListHookedConsumer::Item::refresh(void) { if (! device_) goto restore; { const char* name = device_->getName(); if (! name) goto restore; if (! ListHookedDevice::Item::isConsumer(name)) goto restore; } // ------------------------------------------------------------ if (! Config::get_initialized()) { goto restore; } if (Config::get_essential_config(BRIDGE_ESSENTIAL_CONFIG_INDEX_general_dont_remap_apple_keyboard) && isEqualVendor(DeviceVendor::APPLE_COMPUTER)) { goto restore; } // Logitech USB Headset if (isEqualVendorProduct(DeviceVendor::LOGITECH, DeviceProduct::LOGITECH_USB_HEADSET)) { goto restore; } // Logitech Cordless Presenter if (Config::get_essential_config(BRIDGE_ESSENTIAL_CONFIG_INDEX_general_dont_remap_logitech_cordless_presenter) && isEqualVendorProduct(DeviceVendor::LOGITECH, DeviceProduct::LOGITECH_CORDLESS_PRESENTER)) { goto restore; } #if 0 // Apple Internal Keyboard if (isEqualVendorProduct(DeviceVendor::APPLE_COMPUTER, DeviceProduct::APPLE_INTERNAL_KEYBOARD_TRACKPAD_0x021a)) { goto restore; } #endif #if 0 // Apple External Keyboard if (isEqualVendorProduct(DeviceVendor::APPLE_COMPUTER, DeviceProduct::APPLE_ALUMINUM_KEYBOARD_JIS)) { goto restore; } #endif return replaceEventAction(); restore: return restoreEventAction(); }
bool ListHookedPointing::Item::refresh_callback(void) { if (! device_) goto restore; // ------------------------------------------------------------ if (! Config::initialized) { goto restore; } if (Config::get_essential_config(BRIDGE_ESSENTIAL_CONFIG_INDEX_general_dont_remap_thirdvendor_pointing) && deviceType_ != DeviceType::APPLE_INTERNAL && deviceType_ != DeviceType::APPLE_EXTERNAL) { goto restore; } if (Config::get_essential_config(BRIDGE_ESSENTIAL_CONFIG_INDEX_general_dont_remap_apple_pointing) && isEqualVendor(DeviceVendor::APPLE_COMPUTER)) { goto restore; } // Logitech Cordless Presenter if (Config::get_essential_config(BRIDGE_ESSENTIAL_CONFIG_INDEX_general_dont_remap_logitech_cordless_presenter) && isEqualVendorProduct(DeviceVendor::LOGITECH, DeviceProduct::LOGITECH_CORDLESS_PRESENTER)) { goto restore; } #if 0 // Apple Magic Mouse if (isEqualVendorProduct(DeviceVendor::APPLE_COMPUTER, DeviceProduct::MAGIC_MOUSE)) { goto restore; } #endif return replaceEventAction(); restore: return restoreEventAction(); }