Alpha Software Mobile Development Tools:   Alpha Anywhere    |   Alpha TransForm subscribe to our YouTube Channel  Follow Us on LinkedIn  Follow Us on Twitter  Follow Us on Facebook

Announcement

Collapse

The Alpha Software Forum Participation Guidelines

The Alpha Software Forum is a free forum created for Alpha Software Developer Community to ask for help, exchange ideas, and share solutions. Alpha Software strives to create an environment where all members of the community can feel safe to participate. In order to ensure the Alpha Software Forum is a place where all feel welcome, forum participants are expected to behave as follows:
  • Be professional in your conduct
  • Be kind to others
  • Be constructive when giving feedback
  • Be open to new ideas and suggestions
  • Stay on topic


Be sure all comments and threads you post are respectful. Posts that contain any of the following content will be considered a violation of your agreement as a member of the Alpha Software Forum Community and will be moderated:
  • Spam.
  • Vulgar language.
  • Quotes from private conversations without permission, including pricing and other sales related discussions.
  • Personal attacks, insults, or subtle put-downs.
  • Harassment, bullying, threatening, mocking, shaming, or deriding anyone.
  • Sexist, racist, homophobic, transphobic, ableist, or otherwise discriminatory jokes and language.
  • Sexually explicit or violent material, links, or language.
  • Pirated, hacked, or copyright-infringing material.
  • Encouraging of others to engage in the above behaviors.


If a thread or post is found to contain any of the content outlined above, a moderator may choose to take one of the following actions:
  • Remove the Post or Thread - the content is removed from the forum.
  • Place the User in Moderation - all posts and new threads must be approved by a moderator before they are posted.
  • Temporarily Ban the User - user is banned from forum for a period of time.
  • Permanently Ban the User - user is permanently banned from the forum.


Moderators may also rename posts and threads if they are too generic or do not property reflect the content.

Moderators may move threads if they have been posted in the incorrect forum.

Threads/Posts questioning specific moderator decisions or actions (such as "why was a user banned?") are not allowed and will be removed.

The owners of Alpha Software Corporation (Forum Owner) reserve the right to remove, edit, move, or close any thread for any reason; or ban any forum member without notice, reason, or explanation.

Community members are encouraged to click the "Report Post" icon in the lower left of a given post if they feel the post is in violation of the rules. This will alert the Moderators to take a look.

Alpha Software Corporation may amend the guidelines from time to time and may also vary the procedures it sets out where appropriate in a particular case. Your agreement to comply with the guidelines will be deemed agreement to any changes to it.



Bonus TIPS for Successful Posting

Try a Search First
It is highly recommended that a Search be done on your topic before posting, as many questions have been answered in prior posts. As with any search engine, the shorter the search term, the more "hits" will be returned, but the more specific the search term is, the greater the relevance of those "hits". Searching for "table" might well return every message on the board while "tablesum" would greatly restrict the number of messages returned.

When you do post
First, make sure you are posting your question in the correct forum. For example, if you post an issue regarding Desktop applications on the Mobile & Browser Applications board , not only will your question not be seen by the appropriate audience, it may also be removed or relocated.

The more detail you provide about your problem or question, the more likely someone is to understand your request and be able to help. A sample database with a minimum of records (and its support files, zipped together) will make it much easier to diagnose issues with your application. Screen shots of error messages are especially helpful.

When explaining how to reproduce your problem, please be as detailed as possible. Describe every step, click-by-click and keypress-by-keypress. Otherwise when others try to duplicate your problem, they may do something slightly different and end up with different results.

A note about attachments
You may only attach one file to each message. Attachment file size is limited to 2MB. If you need to include several files, you may do so by zipping them into a single archive.

If you forgot to attach your files to your post, please do NOT create a new thread. Instead, reply to your original message and attach the file there.

When attaching screen shots, it is best to attach an image file (.BMP, .JPG, .GIF, .PNG, etc.) or a zip file of several images, as opposed to a Word document containing the screen shots. Because Word documents are prone to viruses, many message board users will not open your Word file, therefore limiting their ability to help you.

Similarly, if you are uploading a zipped archive, you should simply create a .ZIP file and not a self-extracting .EXE as many users will not run your EXE file.
See more
See less

Disable all shortcuts accept the shortcut's I defined

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • turbojack
    replied
    Re: Disable all shortcuts accept the shortcut's I defined

    Originally posted by Al Buchholz View Post
    Tested in V10 - didn't trap F6
    Does anyone know why we can not trap F6, & what is Alpha's reason for this. Is this a bug never fixed?

    Leave a comment:


  • Al Buchholz
    replied
    Re: Disable all shortcuts accept the shortcut's I defined

    Originally posted by CALocklin View Post
    I learned something new today. The F6 key can't be trapped.

    It's probably the same in v10 also.
    Tested in V10 - didn't trap F6

    Leave a comment:


  • werder101010
    replied
    Re: Disable all shortcuts accept the shortcut's I defined

    I'm happy with the script anyway so thanks again and I'll just have to do without the F6 shortcut.

    Leave a comment:


  • CALocklin
    replied
    Re: Disable all shortcuts accept the shortcut's I defined

    I learned something new today. The F6 key can't be trapped.

    I ran the script below in the OnKey event of one of my forms and the F6 key doesn't even trigger the OnKey event. The "Testing" message never even runs if the F6 key is pressed.

    Disclaimer: I just realized I ran my tests in v8 but I suspect the same will be true of v9 since you seem to be having the same problem. It's probably the same in v10 also.

    Code:
    FOR qx = 1 to 12
    ui_msg_box( "TESTING " + qx, "" )
    IF a_user.key.value = eval( "\"{F" + ltrim(str(qx)) + "}\"" )
        ui_msg_box( "FOUND " + qx, "" )
        a_user.key.handled = .T.
        IF a_user.key.event = "down"
            vcTab = "menu"
            var->menu = 2
            parentform.Refresh_Layout()
            END'
        END IF
    END IF
    NEXT
    END'

    Leave a comment:


  • werder101010
    replied
    Re: Disable all shortcuts except the shortcut's I defined

    Thanks for the script and tips Cal. If I understand correctly the (on key) script blocks “system” and “custom menu” shortcut's. The new shortcut must be defined in the same “on key” script. To let the user understand which menu option is activated with a shortcut I will have to edit my custom menu separately (without the shortcut script). This is an acceptable solution.

    Everything works fine and the F8 shortcut is now replaced but F6 still moves out of an embedded browse and the alternative shortcut isn't executed. Any idea why?

    Code:
    IF a_user.key.value = "{F6}"    
        a_user.key.handled = .T.
            if a_user.key.event = "down"
    vcTab="menu"
    var->menu=2
    parentform.Refresh_Layout()
        END'
    END IF
    END IF
    
    
    IF a_user.key.value = "{F8}"    
        a_user.key.handled = .T.
            if a_user.key.event = "down"
    vcTab="menu"
    var->menu=3
    parentform.Refresh_Layout()
        END'
    END IF
    END IF

    Leave a comment:


  • CALocklin
    replied
    Re: Disable all shortcuts accept the shortcut's I defined

    I just run my "Std_OnKey" script in the OnKey event. Note that the "ESC" routine in the particular script will cause a form to close if it is in View mode. Some users don't like that so just delete the first "IF" when it isn't wanted.

    You may also notice that I use the F1 and F8-F12 keys as "special purpose" keys. By having them "push" the appropriate button, the OnKey code is the same in every form and, IF the specified button exists, then the code on that button will be run. In other words, the F9 key presses the "Done_btn" but the "Done_btn" on each form could do something different - test for missing values, update certain fields, some combination of both, or just close the form.

    The "Alt-Down" action specified for the F8 key is the Windows shortcut used to open drop-down menus from the keyboard. Touch typists sometimes appreciate the fact that they aren't forced to switch to the mouse to use a drop-down.

    FWIW, I also use the F8 key for various other actions at times. A common one is for filling in 'default' values that I don't want to have filled in automatically. If the user wants to enter the default value, they press F8; otherwise they enter whatever other value they want and if it's still blank when they try to save the record, I force them to enter something first. This forces them to think about what they are doing rather than just blindly accepting the default.

    Also, there are no guarantees that this is the most efficient way to do it. However, I originally wrote the script years ago and stored it in my code library. I haven't bothered changing it since. (The 2006 date shown below is just the date it was first used in the app I copied it from. I'm sure I used it before that.)

    Code:
    'Date Created: 18-Aug-2006 08:17:22 PM
    'Last Updated: 18-Aug-2006 08:17:22 PM
    'Created By  : Cal
    'Updated By  : Cal
    
    IF a_user.key.value = "{ESC}"    'This IF MUST be split!
        IF parentform.mode_get() = "VIEW"
            a_user.key.handled = .T.
            IF a_user.key.event = "down"
                parentform.close()
                END'
            END IF
        END IF
    END IF
    IF a_user.key.value = "{F12}"
        IF is_object( parentform:Done_btn.this )
            a_user.key.handled = .T.
            IF a_user.key.event = "down"
                parentform:Done_btn.push()
                END'
            END IF
        END IF
    END IF
    IF a_user.key.value = "{F11}"
        IF is_object( parentform:Find_btn.this )
            a_user.key.handled = .T.
            IF a_user.key.event = "down"
                parentform:Find_btn.push()
                END'
            END IF
        END IF
    END IF
    IF a_user.key.value = "{F10}"
        IF is_object( parentform:Enter_btn.this )
            a_user.key.handled = .T.
            IF a_user.key.event = "down"
                parentform:Enter_btn.push()
                END'
            END IF
        END IF
    END IF
    IF a_user.key.value = "{F9}"
        IF is_object( parentform:Save_btn.this )
            a_user.key.handled = .T.
            IF a_user.key.event = "down"
                parentform:Save_btn.push()
                END'
            END IF
        END IF
    END IF
    IF a_user.key.value = "{F8}"
        a_user.key.handled = .T.
        IF a_user.key.event = "down"
            sys_send_keys( "{ALT-DOWN}" )
            END'
        END IF
    END IF
    IF a_user.key.value = "{F1}"
        IF is_object( parentform:Help_btn.this )
            a_user.key.handled = .T.
            IF a_user.key.event = "down"
                IF is_object( "parentform:Help_btn" )
                    parentform:Help_btn.push()
                    END'
                END IF
            END IF
        END IF
    END IF
    'The following are designed to restrict normal ctrl key functions and should 
    'ALWAYS go at the end of any other control key functions.
    'OEBPQMUDFT
    IF a_user.key.value = "{^O}"    'Open form
        a_user.key.handled = .T.
        END'
    END IF
    IF a_user.key.value = "{^E}"    'Enter Record
        a_user.key.handled = .T.
        END'
    END IF
    IF a_user.key.value = "{^B}"    'Query by Form
        a_user.key.handled = .T.
        END'
    END IF
    IF a_user.key.value = "{^P}"    'Print
        a_user.key.handled = .T.
        END'
    END IF
    IF a_user.key.value = "{^Q}"    'Query Genie
        a_user.key.handled = .T.
        END'
    END IF
    IF a_user.key.value = "{^M}"    'Mark record
        a_user.key.handled = .T.
        END'
    END IF
    IF a_user.key.value = "{^U}"    'Unmark record
        a_user.key.handled = .T.
        END'
    END IF
    IF a_user.key.value = "{^D}"    'Delete record
        a_user.key.handled = .T.
        END'
    END IF
    IF a_user.key.value = "{^F}"    'Find by Form
        a_user.key.handled = .T.
        END'
    END IF
    IF a_user.key.value = "{^T}"    'Dial phone
        a_user.key.handled = .T.
        END'
    END IF
    IF a_user.key.value = "{F8}"    'Switch to browse mode
        a_user.key.handled = .T.
        END'
    END IF

    Leave a comment:


  • MikeC
    replied
    Re: Disable all shortcuts accept the shortcut's I defined

    OOPS!! Sorry....I'll try to be more careful. I'll change my settings. :o
    Last edited by MikeC; 03-28-2010, 12:09 PM.

    Leave a comment:


  • werder101010
    replied
    Re: Disable all shortcuts except the shortcut's I defined

    I was actually trying to say: How do I disable all shortcuts except the shortcut's I defined.

    Leave a comment:


  • Disable all shortcuts accept the shortcut's I defined

    I created a new menu and selected this new menu in form properties. No system menu's are active and toolbars are set to none.

    I defined new shortcut's in my custom menu but shortcut F6 an F8 are not working as defined in my custom menu. F6 and F8 still behave like described in the help menu (F6 move out of an embedded Browse. F8 switch between form and browse view).

    Selwin said:
    Originally posted by Selwyn Rabins View Post
    the shorcut keys are shown in the menu. if you customize the menu, you can customize the shortcut keys.

    if you use a system menu for a form, and the system menu has not been customized, then you are using the default shortcut keys.
    How do I disable all shortcuts accept the shortcut's I defined?
Working...
X