LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
Search this Thread
Old 10-11-2002, 07:52 AM   #1
pdibona
LQ Newbie
 
Registered: Oct 2002
Location: New Jersey
Distribution: Red Hat 8.0
Posts: 20

Rep: Reputation: 0
Can Java detect keyboard escape codes?


I am writing a specialized shell in java (no Swing or AWT). This is an application that will run in text-only mode with the user typing commands.

How can Java detect if the user hit the "up arrow" or "down arrow"?
I tried using the read() method of InputStream to get one byte from the
stream, but it blocks until the user hits a carriage return.

Any ideas?
 
Old 10-13-2002, 08:37 AM   #2
mikez
Member
 
Registered: May 2001
Location: New York
Distribution: Debian, Ubuntu
Posts: 83

Rep: Reputation: 15
I'm assuming inputsteam is the class that reads things...i use 2 different classes called easy reader and easywriter(not written by me). There are no methods in my class to do what you are trying to do. Uou should look on sun.com website and look at all the method or try to a class somebody wrote to handle that. It def. sounds possible. Remember to read the documentation...sorry im not much help

Last edited by mikez; 10-13-2002 at 08:39 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Using escape codes to print barcodes c2tidis Linux - Software 0 09-29-2005 11:44 AM
Are the hex codes for colors in a jpg the same codes as used in html? abefroman Linux - Security 3 07-31-2005 03:21 PM
LFS system - customizing keyboard - what scan codes..? Yerp Linux From Scratch 2 01-15-2005 07:22 PM
Kernel 2.6 and Extended Keyboard Codes davecs Linux - Hardware 1 05-30-2004 09:09 PM
Keyboard scan codes... jinksys Programming 1 09-03-2003 04:52 PM


All times are GMT -5. The time now is 01:45 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration