From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.7 required=5.0 tests=AXB_XMAILER_MIMEOLE_OL_024C2, BAYES_00,MAILING_LIST_MULTI autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,CP1252 X-Google-Thread: 103376,3126ffb923d6f3f1 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-11-23 13:41:37 PST Path: archiver1.google.com!news1.google.com!sn-xit-02!supernews.com!isdnet!enst!enst.fr!not-for-mail From: "David C. Hoos, Sr." Newsgroups: comp.lang.ada Subject: Re: Handling interrupts Date: Fri, 23 Nov 2001 15:40:31 -0600 Organization: ENST, France Sender: comp.lang.ada-admin@ada.eu.org Message-ID: References: Reply-To: comp.lang.ada@ada.eu.org NNTP-Posting-Host: marvin.enst.fr Mime-Version: 1.0 Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: 8bit X-Trace: avanie.enst.fr 1006551696 27143 137.194.161.2 (23 Nov 2001 21:41:36 GMT) X-Complaints-To: usenet@enst.fr NNTP-Posting-Date: Fri, 23 Nov 2001 21:41:36 +0000 (UTC) To: Return-Path: X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 Errors-To: comp.lang.ada-admin@ada.eu.org X-BeenThere: comp.lang.ada@ada.eu.org X-Mailman-Version: 2.0.6 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: comp.lang.ada mail<->news gateway List-Unsubscribe: , List-Archive: Errors-To: comp.lang.ada-admin@ada.eu.org X-BeenThere: comp.lang.ada@ada.eu.org Xref: archiver1.google.com comp.lang.ada:16914 Date: 2001-11-23T15:40:31-06:00 ----- Original Message ----- From: "Jean-David Tr�panier" Newsgroups: comp.lang.ada To: Sent: November 23, 2001 3:14 PM Subject: Handling interrupts > Hi! I would like to discover how to use interrupts handlers on Ada95 so I > was wondering if someone has an example that show how to attach a handler to > the keyboard. Example: when you press on a key, the system write a message: > "key pressed" If that which interests you is just the keyboard, then you don't need an interrupt handler. You should look at Ada.Text_IO.Get_Immediate which can wither be called so as to not return until a key has been pressed, or to return immediately with a Boolean object set to indicate whether a new character is available. If you're looking for keyboard scan codes -- e.g. to get non-character inputs such as funcion keys or the change of state of the Shift, Alt, or Ctl keys, then you have an OS-dependent problem. .