Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7075659
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T06:12:14+00:00 2026-05-28T06:12:14+00:00

In my Mac app, I override and accept certain keystrokes via the keyUp function

  • 0

In my Mac app, I override and accept certain keystrokes via the keyUp function in an NSView, which isn’t meant to accept keystrokes.

When a key is pressed, the keyUp function is called, and I do process the keystroke, without even calling super keyUp:, and everything works, except that it also makes that default ‘doonk’ sound that happens when you press a key somewhere you shouldn’t.

Is there any way to indicate that the keystroke was handled and accepted, and that I don’t need a beep to tell the user it wasn’t?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T06:12:14+00:00Added an answer on May 28, 2026 at 6:12 am

    I think (but am not 100% certain, it’s been a bit of time since I did this) you also need to override the NSView and/or NSResponder performKeyEquivalent: method. There, you’ll return a YES to indicate to the caller that you did indeed handle the event.

    And that will keep the “dooonk” sound from happening.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm writing a Mac app in XCode 4 which works perfectly in Lion. However
I heard Apple will accept only Objective C apps in the Mac App store.
I have a custom NSView in my mac app and I want to do
I'm coding a mac app in XCode which switches between mySQL and Oracle databases.
I am writing a Cocoa Mac app which uses an IKImageBrowserView. When I call
I'm making a Mac app which needs to know when the user is scrolling
In my mac os x app, I subclass NSApplication and override it's -sendEvent: method.
I just updated Xcode to version 4.3 via the Mac App Store last week,
I am having an application which I will be putting into the Mac App
I'm developing a Mac App in Java that logs into any one of our

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.