How to recognize the "Enter" keystroke


Closed Thread
Results 1 to 8 of 8

Hybrid View

  1. #1
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,624


    Did you find this post helpful? Yes | No

    Default Re: How to recognize the "Enter" keystroke

    Hi Dick,

    As far as the linefeed goes I'd say it depends....
    If this is something for your own use then by all means, whatever works. But if you're shipping it out for others to use my advise is to make it as robust as you can (and there's probably more that can be done on that front).

    For example, the serial terminal in MicroCode Studio can be set up to end each line with CR, CR+LF, LF+CR, NULL or nothing at all.
    So if it, or any other terminal program, happens to be set to LF+CR instead of just CR or CR+LF then you would need to check for it.

    I couldn't make it work properly without also looking for LF. I only tried with the serial terminal in MCSP though.

    /Henrik.

  2. #2


    Did you find this post helpful? Yes | No

    Default Re: How to recognize the "Enter" keystroke

    Henrick,
    You're right that terminals can be configured differently. I'm using TeraTermPro and Hyperterm VT100 terminals. Both are configured for the lines to end with a CR. Agreed that it would be best to cover all the possibilities as you suggest.

    I'm pleased with the way the Enter key recognition is now working. I'm sure that improvements are possible, but I'm leaving this subject for now to go on with my project. I've learned a lot from this exercise.
    Thx
    Dick

Similar Threads

  1. Replies: 0
    Last Post: - 14th November 2013, 04:32
  2. Replies: 3
    Last Post: - 15th October 2012, 09:06
  3. Replies: 8
    Last Post: - 3rd March 2011, 23:20
  4. Replies: 1
    Last Post: - 27th August 2009, 03:42
  5. Replies: 1
    Last Post: - 16th February 2005, 21:05

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts