-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ecd1a07
commit 5dd4a20
Showing
4 changed files
with
121 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
// spdx-license-identifier: gpl-3.0-or-later | ||
/* | ||
* copyright (c) 2024 chirag singla | ||
*/ | ||
|
||
#ifndef UNICODE | ||
#define UNICODE | ||
#endif | ||
|
||
#include <windows.h> | ||
#include "Utils.h" | ||
|
||
const wchar_t * MapModifierKey(DWORD code) { | ||
switch (code) { | ||
case VK_BACK: | ||
return TEXT("Backspace"); | ||
|
||
case VK_TAB: | ||
return TEXT("Tab"); | ||
|
||
case VK_RETURN: | ||
return TEXT("Enter"); | ||
|
||
case VK_SHIFT: | ||
return TEXT("Shift"); | ||
|
||
case VK_CONTROL: | ||
return TEXT("Ctrl"); | ||
|
||
case VK_MENU: | ||
return TEXT("Alt"); | ||
|
||
case VK_PAUSE: | ||
return TEXT("Pause"); | ||
|
||
case VK_CAPITAL: | ||
return TEXT("Caps"); | ||
|
||
case VK_ESCAPE: | ||
return TEXT("ESC"); | ||
|
||
case VK_SPACE: | ||
return TEXT("_"); | ||
|
||
case VK_PRIOR: | ||
return TEXT("PgUp"); | ||
|
||
case VK_NEXT: | ||
return TEXT("PgDn"); | ||
|
||
case VK_END: | ||
return TEXT("End"); | ||
|
||
case VK_HOME: | ||
return TEXT("Home"); | ||
|
||
case VK_LEFT: | ||
return TEXT("Left"); | ||
|
||
case VK_UP: | ||
return TEXT("Up"); | ||
|
||
case VK_RIGHT: | ||
return TEXT("Right"); | ||
|
||
case VK_DOWN: | ||
return TEXT("Down"); | ||
|
||
case VK_SELECT: | ||
return TEXT("Select"); | ||
|
||
case VK_PRINT: | ||
return TEXT("Print"); | ||
|
||
case VK_INSERT: | ||
return TEXT("Ins"); | ||
|
||
case VK_DELETE: | ||
return TEXT("Del"); | ||
|
||
case VK_HELP: | ||
return TEXT("Help"); | ||
|
||
default: | ||
return TEXT("-"); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
// spdx-license-identifier: gpl-3.0-or-later | ||
/* | ||
* copyright (c) 2024 chirag singla | ||
*/ | ||
|
||
#pragma once | ||
|
||
#ifndef UNICODE | ||
#define UNICODE | ||
#endif | ||
|
||
#include <windows.h> | ||
|
||
const wchar_t * MapModifierKey(DWORD code); |