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 8101831
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T23:05:07+00:00 2026-06-05T23:05:07+00:00

My programming background comes from C and some C++ programming with strong emphasis on

  • 0

My programming background comes from C and some C++ programming with strong emphasis on C# at the last years.

I am very new to Cocoa and ObjectiveC programming (not to mention Mac stuff) and I am developing an iPad application.

I would like to get keyboard codes from the standard on-screen keyboard but without using any (at least visible) control like Text Field. Also, I would like to get the key codes as soon you press it, detecting both the key down and up events.

Any hints on how that is doable?

Thank you in advance
Pedro Duarte

  • 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-06-05T23:05:09+00:00Added an answer on June 5, 2026 at 11:05 pm

    [EDIT]
    After seeing the key down and key up ideas within your question now!!!

    The only ways I know how to capture press down, and press up events are with gestureRecognizer objects, or with writing your own custom code within

    -(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event
    -(void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event
    

    and

    -(void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event
    

    Problem is there is no way you can over-ride the natural keyboard touch event structure with your own to be able to capture up and down events separately. This gets to the real sad part. In order to do this, you will most likely have to create your own keyboard, as well as event structure using the routines I stated above as even gestureRecognizer objects aren’t granular enough to give you the down and up events separately.

    [ORIGINAL]
    The way to do this is to put an invisible UITextField on screen, when you wish to have keyboard input.

    You would then implement some or all of the UITextField delegate methods to grab your text at the end of editing , during, etc…

    Here are a couple of SO links to get you started as well!

    // The below implements a custom keyboard capability that limits text input to floating point numerics (not scientific or anything, just simple floats with a single period) and is re-putting the text back onto the visible UITextField that initiated the input.

    Need a robust solution to keyboard entry of an integer value in Settings bundle

    With the below, a UITextField is created dynamically in code when a user taps on an element of a UISegmentedControl (as they wish to change the text within the one pressed). The UITextField is made invisible, and the text is applied to the text of a UISegmentedControl Item.

    Change title of segmented control with edit button?

    One doesnt have to implement it this way. You could statically define your UITextField, make it invisible (on screen), and only activate the keyboard for it when the object you wish to have its text changed is tapped, etc…

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

Sidebar

Related Questions

I am from procedure programming background, end up writing TSQL recently with my new
I have about 4-5 years of background in programming some in C# and some
I'm new to C programming, I come from a Java background. I was wondering
I come from a procedural programming background, and need some help grasping how methods
I am new to programming and come from a non-CS background (no formal degree).
I am new to web programming, coming from a video game development background (c++),
I am new to Qt GUI programming and come from a .NET/Winforms background as
I come from a PHP based background and my new years resolution was to
When I was learning Java coming from a background of some 20 years of
For programmers that do not come from a functional programming background, are there an

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.