Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware API
      • ZBrush Python API
      • ZBrush GoZ API
      • Code Examples on Github
    • Forum
    • Downloads
    • Support
      • Support Procedures
      • Registered Developer Program
      • Plugin IDs
      • Contact Us
    • Categories
      • Overview
      • News & Information
      • Cinema 4D SDK Support
      • Cineware SDK Support
      • ZBrush 4D SDK Support
      • Bugs
      • General Talk
    • Unread
    • Recent
    • Tags
    • Users
    • Login

    Detecting Esc key

    SDK Help
    0
    3
    317
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • H
      Helper
      last edited by

      On 23/06/2014 at 06:33, xxxxxxxx wrote:

      User Information:
      Cinema 4D Version:   14 
      Platform:      Mac OSX  ; 
      Language(s) :     C++  ;

      ---------
      I have a process that can take a long time to process.
      It is inside a Message method of a DescriptionToolData because it is activated by a button.
      How can I detect that the Esc key was pressed inside this process? (the process involves two nested for-loops).

      I was using:

      BaseContainer bck;
      Bool ESCAPE = GetInputState(BFM_INPUT_KEYBOARD, BFM_INPUT_CHANNEL, bck);
      if (ESCAPE && bck.GetLong(BFM_INPUT_VALUE)==KEY_ESC) ...

      But it is not working.

      1 Reply Last reply Reply Quote 0
      • H
        Helper
        last edited by

        On 24/06/2014 at 00:58, xxxxxxxx wrote:

        I saw this thread the other day it`s python but might be useful - https://developers.maxon.net/forum/topic/6689/7294_getting-esc-key-input&KW=keypress&PID=30439#30439

        1 Reply Last reply Reply Quote 0
        • H
          Helper
          last edited by

          On 24/06/2014 at 08:49, xxxxxxxx wrote:

          Thank you very much, Eclectrick.
          It worked great 🙂

          1 Reply Last reply Reply Quote 0
          • First post
            Last post