Results 1 to 8 of 8

Thread: How can I tell the diff betrween Enter and Carriage Return

  1. #1

    Thread Starter
    New Member
    Join Date
    Nov 2000
    Location
    uk
    Posts
    1
    I'm trying to trap these key strokes - VB Books online tells me that vbKeyReturn has a value of 13 and vbKeySepartor 108. But all I can get is 13. any Ideas

  2. #2
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221
    What event do you use to catch it? I bet it's Keypress, you should use Keydown
    Use
    writing software in C++ is like driving rivets into steel beam with a toothpick.
    writing haskell makes your life easier:
    reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
    To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.

  3. #3
    Fanatic Member Mad Compie's Avatar
    Join Date
    Aug 2000
    Location
    Kuurne (Belgium)
    Posts
    553
    The ANSI communications standard says that ASCII value 13 (=0Dh) represents the carriage return command.
    It is commonly used in combination with Line Feed (ASCII 10 or 0Ah), giving us a common CR+LF sequence (=0D0Ah).

  4. #4
    Guest
    Mad Compie is correct. If you open your file in a Binary Editor, you'll see both 13 and 10.

  5. #5
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221
    I thought we were talking about key codes, not ascii codes, well uh i tried myself and getasynkeystate seems not to recognize 108 i've tried all keys
    Use
    writing software in C++ is like driving rivets into steel beam with a toothpick.
    writing haskell makes your life easier:
    reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
    To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.

  6. #6
    Fanatic Member Mad Compie's Avatar
    Join Date
    Aug 2000
    Location
    Kuurne (Belgium)
    Posts
    553
    True, VK_SEPARATOR should normally by the Enter key in the numerical key zone, but I could not simulate this code anyway.

  7. #7
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221
    might be it's obsolete and only exists for backward compability or something
    Use
    writing software in C++ is like driving rivets into steel beam with a toothpick.
    writing haskell makes your life easier:
    reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
    To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.

  8. #8
    Fanatic Member Mad Compie's Avatar
    Join Date
    Aug 2000
    Location
    Kuurne (Belgium)
    Posts
    553
    Yes, or for some other type of keyboard than we are using...

Posting Permissions

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



Click Here to Expand Forum to Full Width