Skip to content

Commit

Permalink
Add global hotkey support, implement Ctrl+O open and Ctrl+R reload.
Browse files Browse the repository at this point in the history
  • Loading branch information
bbbradsmith committed Oct 10, 2024
1 parent 118ba9d commit eb23231
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
16 changes: 16 additions & 0 deletions BinxelviewForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1927,5 +1927,21 @@ private void dataGridPixel_CellValueChanged(object sender, DataGridViewCellEvent
redrawPixels();
}
}

protected override bool ProcessCmdKey(ref Message msg, Keys keyData)
{
// global hotkeys
switch (keyData)
{
case Keys.Control | Keys.O:
openToolStripMenuItem_Click(this, null);
return true;
case Keys.Control | Keys.R:
reloadFileToolStripMenuItem_Click(this, null);
return true;
default:
return base.ProcessCmdKey(ref msg, keyData);
}
}
}
}
10 changes: 10 additions & 0 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,15 @@ Custom palettes are 24-bit RGB triples (8 bits for each component).
Click on a colour in the palette box to edit it.


Hotkeys
-------

The following global hotkeys may be used:

Ctrl+O - Open a new file.
Ctrl+R - Reload the current file.


Other Notes
-----------

Expand Down Expand Up @@ -157,6 +166,7 @@ Changes
- Maximum file size increased from 256MB to 2GB.
- Right click context menu option to move position to the selected pixel.
- File menu reload option.
- Added global Ctrl hotkeys.

1.5.0.0 (2020-07-31)
- Twiddle option for inspecting textures stored with morton ordering of pixels.
Expand Down

0 comments on commit eb23231

Please sign in to comment.