Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6011347
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T02:14:50+00:00 2026-05-23T02:14:50+00:00

Like the one in Visual Studio > Options > Keyboard > Press shortcut keys

  • 0

Like the one in Visual Studio > Options > Keyboard > Press shortcut keys field.

Can I save this key press as a single combined value, or do I have to save the key press and each modifier key separately?

I just wanna show the currently pressed keys in the TextBox like:

Ctrl+G
Alt+X
Shift+V
R
Ctrl+Alt+S
etc

Also looking for the best way to store the keypress value. If I have to store the keys and modifier keys separately, then I will make a new type that has all of them in one place.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T02:14:51+00:00Added an answer on May 23, 2026 at 2:14 am

    In the textbox KeyDown event:

            string keys = "";
    
            if ((Keyboard.Modifiers & ModifierKeys.Control) > 0)
            {
                keys += "Control + ";
            }
    
            if ((Keyboard.Modifiers & ModifierKeys.Alt) > 0)
            {
                keys += "Alt + ";
            }
    
            if ((Keyboard.Modifiers & ModifierKeys.Shift) > 0)
            {
                keys += "Shift + ";
            }
    
            keys += e.Key;
    
            YourTextBox.Text = keys;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

When I press format whole document in Visual studio, some tages like h1 and
I want Vim 's completion menu to work more like the one in Visual
How to create WPF Application Preloader (like one on this Word 2010 Prt Scrn)?
I know at first glance (due to the title) this looks like one of
I have tested a couple of benchmarking snippets on Delphi like this one: uses
I'm just migrating my projects from Visual Studio to Eclipse, so I can build
I had no problem with this in Visual Studio 2008 but it seems that
I'd like to compile panda3d for arm and downloaded the c++ version visual studio
I installed Visual Studio 2010 Ultimate edition and it seems like there is no
Given an array like {one two, three four five}, how'd you calculate the total

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.