Results 1 to 10 of 10

Thread: Application Hotkeys

  1. #1

    Thread Starter
    PowerPoster VBDT's Avatar
    Join Date
    Sep 2005
    Location
    CA - USA
    Posts
    2,922

    Question Application Hotkeys

    Hi everyone, I like to hear some answers (ideas) to this question. The question is:
    What if an application (let say app1) gives the user an option to define a hotkey and saves it in the app’s settings so that the next time app starts it will register that hotkey. This will be a good feature to have right?

    BUT now imagine that you installed another application (let say app2) that uses the same hotkey and then you open the first app (app1) that has the same hotkey too. It simply will fail notifying that the hotkey already exists. So the real question is’ what is the best way deal with this sort of problem?

    Thanks in advance

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,222

    Re: Application Hotkeys

    Don't register any hot key without notifying the user, give the user the option to change the default hot key combination if they wish and then assume they're not stupid enough to register the same hot key twice. You might also include a note in your documentation. Of course, no-one reads documentation (if half the members here are anything to go by ) so that may be a waste of time.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  3. #3

    Thread Starter
    PowerPoster VBDT's Avatar
    Join Date
    Sep 2005
    Location
    CA - USA
    Posts
    2,922

    Re: Application Hotkeys

    Quote Originally Posted by jmcilhinney
    Don't register any hot key without notifying the user, give the user the option to change the default hot key combination if they wish and then assume they're not stupid enough to register the same hot key twice. You might also include a note in your documentation. Of course, no-one reads documentation (if half the members here are anything to go by ) so that may be a waste of time.
    Hi Jmc, thanks for the advice but it is not clear to me what you mean. I am giving the user the option to change the hotkeys in the application settings window to what he wants. And that is the whole point of using the hot key, other wise I would hook the keyboard and set a key combination to do the task.
    Do you suggest forcing the user to set the hotkeys every time application starts? If yes than it is a good idea but I have never seen any application to do that.

  4. #4
    Frenzied Member
    Join Date
    Mar 2006
    Location
    Pennsylvania
    Posts
    1,069

    Re: Application Hotkeys

    Certainly do not prompt the user each time the program is run. That'd get very annoying, fast. It's a good thing you don't see any applications that do that.

    Also, don't worry about the double hotkeys thing. If the user is stupid enough, as John said, to assign the same hotkey to more than one task, it is their fault if the program crashes (which it probably won't).

    Have you thought about maybe having a file such as ini or config consisting of the hotkeys?

  5. #5
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,222

    Re: Application Hotkeys

    I'm saying that you should give users some credit for not being complete morons and not feel too sorry for them when this turns out to be incorrect. Register your hot key and tell the user not to register the same hot key for any other app. If they fail to take note of that then they deserve whatever they get.
    Last edited by jmcilhinney; Jan 3rd, 2008 at 08:01 PM.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  6. #6

    Thread Starter
    PowerPoster VBDT's Avatar
    Join Date
    Sep 2005
    Location
    CA - USA
    Posts
    2,922

    Re: Application Hotkeys

    I see what you mean. My worry is not on the user side but an application that may register a hot key that is assigned to be used with my application by the user.
    I think, maybe I need to show a warning message if my application starts and the hot key is in use with another application so that the user can set some other hotkey.

  7. #7
    Frenzied Member
    Join Date
    Mar 2006
    Location
    Pennsylvania
    Posts
    1,069

    Re: Application Hotkeys

    Or you could just assume that the other application currently holding the active hotkey will prompt the user with a message box

  8. #8

    Thread Starter
    PowerPoster VBDT's Avatar
    Join Date
    Sep 2005
    Location
    CA - USA
    Posts
    2,922

    Re: Application Hotkeys

    Quote Originally Posted by Fromethius
    Or you could just assume that the other application currently holding the active hotkey will prompt the user with a message box
    Ah, if the life was that easy . Assumptions are not good in programming; often they create a buggy application .

  9. #9
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,222

    Re: Application Hotkeys

    If your app tries to do something and fails then it should always notify the user, so if you try to register a hot key and fail, the course of action should be relatively obvious.

    Also, no well written application should be registering hot keys without notifying the user and, preferably, giving them the option to change the key combination. If the user knows that one application has registered one particular hot key then it's their own foolishness if they register the same hot key in another. Even if the other application is poorly written, the user always has the option of changing the hot key in yours, because it's well written.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  10. #10

    Thread Starter
    PowerPoster VBDT's Avatar
    Join Date
    Sep 2005
    Location
    CA - USA
    Posts
    2,922

    Re: Application Hotkeys

    Ok, thanks Jmc and every one. I think I should notify the user about the hotkey registering failure and suggest him to set it in the options window.
    Thanks again.

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