nsevent
NSOpenGLView, NSWindow & NSResponder - makeFirstResponder not working
In the code below I am Initialising a NSViewController [a NSResponder], with a NSWindow, a NSOpenGLView, presenting the view and attempting to set the NSViewController as the windows first responder.[详细]
2023-04-05 18:22 分类:问答Send NSEvent to background app
I need to send the key combo ^⌘C to a background app with the bundle identifier com.company.app. The key combo should then activate a menu item in that application.[详细]
2023-04-05 06:52 分类:问答Detecting Ctrl + Return or Ctrl + Enter presses
I find it very hard to find anything official on this matter. I have a TextView and override the keyDown event and try to detect if the user开发者_如何学Go pressed Ctrl + Enter.[详细]
2023-04-03 22:44 分类:问答device from NSEvent
I have an application that uses a barcode scanner. I want to be able to determine who pressed a key: the keyboard or the barcode scanner. I tried all the methods from the N开发者_开发知识库SEvent, but[详细]
2023-03-24 12:28 分类:问答mouseEntered event disabled when mouseDown (NSEvents Mac)
I have created an NSButton class, and when rolling over my buttons it happily detects mouseEntered and mouseExited events. But as soon as the mouseDown event occurs, so long as the mouse it down, mous[详细]
2023-03-21 05:39 分类:问答Mouse Events Bleeding Through NSView
I have an NSView which covers its parent window\'s content view. This view has a click event handler which removes it from the content view. Inside this view, I have another view. When I drag the mous[详细]
2023-03-18 18:33 分类:问答Check modifierFlags of NSEvent if a certain modifier was pressed but no other
I just experimented with the addLocalMonitorForEventsMatchingMask:handler: method in NSEvent and came across the following question: How do I find out if only certain modifiers were pressed?[详细]
2023-03-07 18:13 分类:问答Sending CGEvents keystrokes to background apps
I am trying to 开发者_如何学JAVAsend enter key to a background app like this: CGEventRef a = CGEventCreateKeyboardEvent(eventSource, 36, true);[详细]
2023-03-07 16:13 分类:问答Hooking [NSEvent mouseLocation] at the system level?
So I\'d like to be able to hook [NSEvent mouseLocation] at the system level, and basically have it return what I\'d like.[详细]
2023-03-02 15:31 分类:问答Getting function key press on NSSearchField without subclassing
I have a simple application which has an 开发者_如何学PythonNSSearchField and I want to know if the user presses, for example, an arrow key. I don\'t want to subclass, because I want to modify the val[详细]
2023-03-01 19:01 分类:问答