Alpha Video Training
Results 1 to 5 of 5

Thread: "Shortcuts" for Arrow keys to launch XBasic

  1. #1
    Member
    Real Name
    Robert W. McGaffic
    Join Date
    Mar 2007
    Posts
    577

    Default "Shortcuts" for Arrow keys to launch XBasic

    Is it possible to assign a XBasic script to the arrow keys (up, down, left, right)?

    The only discussion of short cuts I find in the documentation relates to splash screens to open an Alpha application.

    I would like to execute some XBasic code whenever a user hits
    Ctrl+Arrow key or
    Alt+Arrow key.

    I would like to use the keyboard's arrows rather than defining four buttons on my form for this kind of navigation.

    Is this possible?

    Thanks,
    Bob McGaffic
    Pittsburgh

  2. #2
    "Certified" Alphaholic Tim Kiebert's Avatar
    Real Name
    Tim Kiebert
    Join Date
    Jul 2004
    Location
    Geelong, Victoria, Australia
    Posts
    2,785

    Default Re: "Shortcuts" for Arrow keys to launch XBasic

    Bob, yes it is possible.

    Browse the help and the forums using the term 'OnKey'

    You are going to want to place code in the OnKey event of the form.
    Tim Kiebert
    Eagle Creek Citrus
    A complex system that does not work is invariably found to have evolved from a simpler system that worked just fine.

  3. #3
    VAR csda1's Avatar
    Real Name
    Ira J Perlow
    Join Date
    Apr 2000
    Location
    Boston, Massachusetts, USA
    Posts
    3,530

    Default Re: "Shortcuts" for Arrow keys to launch XBasic

    Hi Tim,

    Quote Originally Posted by Tim Kiebert View Post
    Bob, yes it is possible.

    Browse the help and the forums using the term 'OnKey'

    You are going to want to place code in the OnKey event of the form.
    To clarify, only when a dialog box (modal or modeless), form or browse has focus, can the keys be trapped.

    It would be nice if Alpha had a global ONKEY event, so for example, pressing a function key might take you to a particular form, no matter what was currently selected.
    Regards,

    Ira J. Perlow
    Computer Systems Design


    CSDA A5 Products
    New - Free CSDA DiagInfo - v1.39, 30 Apr 2013
    CSDA Barcode Functions

    CSDA Code Utility
    CSDA Screen Capture



  4. #4
    "Certified" Alphaholic Tim Kiebert's Avatar
    Real Name
    Tim Kiebert
    Join Date
    Jul 2004
    Location
    Geelong, Victoria, Australia
    Posts
    2,785

    Default Re: "Shortcuts" for Arrow keys to launch XBasic

    Hello Ira,

    Long time no talk.

    Yes, thanks for the clarification. I was going by Bob's phrase
    Code:
    rather than defining four buttons on my form for this kind of navigation.
    so assumed my response would be taken in that context. I know , I know, it was my mistake to assume. :)

    A global scope of the OnKey event I had not considered but that would certainly be an interesting addition.
    Tim Kiebert
    Eagle Creek Citrus
    A complex system that does not work is invariably found to have evolved from a simpler system that worked just fine.

  5. #5
    Member
    Real Name
    Robert W. McGaffic
    Join Date
    Mar 2007
    Posts
    577

    Default Re: "Shortcuts" for Arrow keys to launch XBasic

    Tim and Ira,

    Thanks for your insights and clarification.

    Really glad to hear that this is possible -- allowing a user to navigate using the keyboard arrows without picking up/putting down the mouse.

    To many developers, a shortcut is the combination of two keys depressed at the same time.

    I just wish the help index included a cross reference for ONKEY for shortcut.

    With apologies to Steve Martin, I guess I have to make a more determined effort to think like an Alpha documention indexer. Gee, if he or she would only think like the common developer, the help could be more useful.

    What would we do without guys like you!

    Bob McGaffic
    Pittsburgh, PA

Similar Threads

  1. A "Continue" for the "While" statement in XBASIC
    By brett s in forum Archived Wishlist
    Replies: 9
    Last Post: 07-13-2008, 06:02 AM
  2. "Add" and "Save" buttons don't stay on "Self" page
    By Scholin in forum Application Server Version 8
    Replies: 2
    Last Post: 02-05-2008, 08:50 AM
  3. News window "crashes" at launch
    By Justus in forum Alpha Five Version 7
    Replies: 2
    Last Post: 12-28-2005, 08:04 PM
  4. "Display only unique keys" not working
    By Jay Talbott in forum Alpha Five Version 6
    Replies: 7
    Last Post: 12-09-2004, 05:51 PM
  5. Quicks keys to "select all" text in memo
    By juk syj fun in forum Alpha Five Version 5
    Replies: 5
    Last Post: 07-07-2003, 12:42 PM

Bookmarks

Posting Permissions

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