Post

Replies

Boosts

Views

Activity

Comment on Simulating Fn (Globe) + Arrow Key Events Ignoring Fn Modifier
I remapped two hardware keys using the IOHIDEventSystemClient API to ones corresponding to the Fn (Globe) and then manually tested their behavior. The 0xFF0100000030 is equivalent to kHIDUsage_AppleVendorKeyboard_Language, part of the AppleVendor Keyboard Page (0xff01) usage page, and the 0xFF00000003 is equivalent to kHIDUsage_AV_TopCase_KeyboardFn, part of the AppleVendor Page Top Case (0x00ff). Reference: Apple’s official HID usage tables
Topic: UI Frameworks SubTopic: General Tags:
Oct ’24
Comment on Simulating Fn (Globe) + Arrow Key Events Ignoring Fn Modifier
Slight correction: .maskSecondaryFn is 0x800000 (NX_SECONDARYFNMASK / kCGEventFlagMaskSecondaryFn / NSFunctionKeyMask / 8388608). But simulating 0xFF00000003 key press on mouse click still stands as the goal.
Topic: UI Frameworks SubTopic: General Tags:
Replies
Boosts
Views
Activity
Oct ’24
Comment on Simulating Fn (Globe) + Arrow Key Events Ignoring Fn Modifier
I remapped two hardware keys using the IOHIDEventSystemClient API to ones corresponding to the Fn (Globe) and then manually tested their behavior. The 0xFF0100000030 is equivalent to kHIDUsage_AppleVendorKeyboard_Language, part of the AppleVendor Keyboard Page (0xff01) usage page, and the 0xFF00000003 is equivalent to kHIDUsage_AV_TopCase_KeyboardFn, part of the AppleVendor Page Top Case (0x00ff). Reference: Apple’s official HID usage tables
Topic: UI Frameworks SubTopic: General Tags:
Replies
Boosts
Views
Activity
Oct ’24
Comment on Simulating Fn (Globe) + Arrow Key Events Ignoring Fn Modifier
I also tried using IOKit.hid directly, but that didn’t help either. Nor did info available here: https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/EventOverview/HandlingKeyEvents/HandlingKeyEvents.html
Topic: UI Frameworks SubTopic: General Tags:
Replies
Boosts
Views
Activity
Oct ’24
Comment on Applying Custom Rounded Corners to a macOS Window
I’m talking about inner rim stroke that almost every window, popover, menu, etc. in the system has. This stroke is more apparent in dark mode.
Topic: UI Frameworks SubTopic: AppKit Tags:
Replies
Boosts
Views
Activity
Oct ’24
Comment on Applying Custom Rounded Corners to a macOS Window
There’s a reason I emphasized “while maintaining the system’s dynamic, contrasting border.” The solution you linked to, like every other one on the web, does not provide a window border that masks to the containing view.
Topic: UI Frameworks SubTopic: AppKit Tags:
Replies
Boosts
Views
Activity
Oct ’24
Comment on Selectively Removing Default Menu Bar Menus (like File, Edit, View, Window)
Filed under FB13324789, FB13324866, and FB13324935.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Nov ’23
Comment on Selectively Removing Default Menu Bar Menus (like File, Edit, View, Window)
They won’t. The highest voted solution is quite inelegant since it’s hardcoding strings, and my app is localized in numerous languages. I would need to find the menu names for each language and then match the strings. The other, where someone suggested using UIMenuBuilder – that API isn’t available on macOS, and I’m not using Mac Catalyst.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Oct ’23
Comment on Detecting if Mac has a backlit keyboard
Of course.
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Dec ’21
Comment on Detecting if Mac has a backlit keyboard
You’re a legend. Amazing as always. Thank you.
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Dec ’21
Comment on SMLoginItemSetEnabled helper tool questions
I just emailed you the details. I think you’ll find it interesting. let myEmail = "rakic" + "@" + "me.com"
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
Dec ’21
Comment on Detecting the layout of an internal Apple hardware keyboard
Since KBGetLayoutType and LMGetKbdType are Carbon APIs, although not yet deprecated, is it okay to use them for Mac App Store distribution?
Topic: UI Frameworks SubTopic: AppKit Tags:
Replies
Boosts
Views
Activity
Nov ’21