Skip to content

Commit

Permalink
Replacement for stolen global keyboard shortcut
Browse files Browse the repository at this point in the history
Windows 10 Fall Creators [sic] Update has taken yet another global
keyboard shortcut. These are a precious resource but they continue to be
used for frivolous niche cases with no easy way of freeing them up for
other purposes.

wprui had to change their trace-recording keyboard shortcut for the same
reason so I am following their lead. RIP Ctrl+Win+C. Long live
Ctrl+Win+C.
  • Loading branch information
randomascii committed Oct 26, 2017
1 parent 02768e9 commit a45032b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion UIforETW/UIforETW.rc
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ EXSTYLE WS_EX_APPWINDOW
CAPTION "UI for ETW"
FONT 8, "MS Shell Dlg", 0, 0, 0x1
BEGIN
PUSHBUTTON "Start &Tracing (Ctrl+Win+C)",IDC_STARTTRACING,7,7,95,14
PUSHBUTTON "Start &Tracing (Ctrl+Win+R)",IDC_STARTTRACING,7,7,95,14
PUSHBUTTON "Sa&ve Trace Buffers (Ctrl+Win+C)",IDC_SAVETRACEBUFFERS,105,7,115,14
PUSHBUTTON "Sto&p Tracing",IDC_STOPTRACING,223,7,50,14
DEFPUSHBUTTON "UnusedDefaultButton",IDC_UNUSEDDEFAULTBUTTON,287,7,84,14,NOT WS_VISIBLE
Expand Down
6 changes: 4 additions & 2 deletions UIforETW/UIforETWDlg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -354,9 +354,11 @@ BOOL CUIforETWDlg::OnInitDialog()
initialWidth_ = lastWidth_ = windowRect.Width();
initialHeight_ = lastHeight_ = windowRect.Height();

// Win+Ctrl+C is used to trigger recording of traces. This is compatible with
// Win+Ctrl+R is used to trigger recording of traces. This is compatible with
// wprui. If this is changed then be sure to change the button text.
if (!RegisterHotKey(*this, kRecordTraceHotKey, MOD_WIN + MOD_CONTROL, 'C'))
// It used to be Win+Ctrl+C but the Fall Creators [sic] Update stole that
// shortcut, globally, which I think is a really rude thing to do.
if (!RegisterHotKey(*this, kRecordTraceHotKey, MOD_WIN + MOD_CONTROL, 'R'))
{
AfxMessageBox(L"Couldn't register hot key.");
btSaveTraceBuffers_.SetWindowTextW(L"Sa&ve Trace Buffers");
Expand Down

0 comments on commit a45032b

Please sign in to comment.