Codes of multimedia keys

前端 未结 3 599
北荒
北荒 2021-01-18 18:41

What are the codes for multimedia keys sendkey, keys like stop, play, add sound, turn down, mute?

相关标签:
3条回答
  • 2021-01-18 18:49

    I don't have such a keyboard, but i would think:

    1. they differ from manufacturer to manufacturer
    2. some of these keys will be received by the driver of the keyboard manufacturer and will create some kind of action directly their without propagating them to the OS as a normal key event.

    To get a clue for your specific keyboard you should make a small test application containing a Form, set the KeyPreview to true and simply subscribe to the KeyDown event of it. Their you'll put maybe some code like this:

    private void FormMain_KeyDown(object sender, KeyEventArgs e)
    {
        System.Diagnostics.Debug.Print(e.KeyData.ToString());
    }
    

    So you get in the Output Window of Visual Studio visualized the pressed key.

    0 讨论(0)
  • 2021-01-18 19:00

    See this reference.

    0 讨论(0)
  • 2021-01-18 19:05

    Look in Keys Enum, play is an OR like this: Play = Exsel | OemBackslash,

    0 讨论(0)
提交回复
热议问题