1
0
mirror of https://github.com/fadden/6502bench.git synced 2024-07-07 07:28:57 +00:00

Recognize mouse thumb-button for navigate-back

There's a common convention for using one of the thumb buttons on
the side of the mouse to mean "back", notably in web browsers.  I
keep hitting it without thinking about it, so let's just make it
official.
This commit is contained in:
Andy McFadden 2018-10-11 17:03:08 -07:00
parent b97f7ca3d8
commit 2b6a76fad0
2 changed files with 7 additions and 10 deletions

View File

@ -1222,8 +1222,8 @@ namespace SourceGen.AppForms
this.codeListView.RetrieveVirtualItem += new System.Windows.Forms.RetrieveVirtualItemEventHandler(this.codeListView_RetrieveVirtualItem);
this.codeListView.SelectedIndexChanged += new System.EventHandler(this.codeListView_SelectedIndexChanged);
this.codeListView.VirtualItemsSelectionRangeChanged += new System.Windows.Forms.ListViewVirtualItemsSelectionRangeChangedEventHandler(this.codeListView_VirtualItemsSelectionRangeChanged);
this.codeListView.MouseClick += new System.Windows.Forms.MouseEventHandler(this.codeListView_MouseClick);
this.codeListView.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.codeListView_MouseDoubleClick);
this.codeListView.MouseDown += new System.Windows.Forms.MouseEventHandler(this.codeListView_MouseDown);
//
// columnOffset
//

View File

@ -1963,15 +1963,12 @@ namespace SourceGen.AppForms {
dlg.Dispose();
}
private void codeListView_MouseClick(object sender, MouseEventArgs e) {
//if (e.Button == MouseButtons.Left) {
// Debug.WriteLine("LEFT CLICK");
//} else if (e.Button == MouseButtons.Right) {
// Debug.WriteLine("RIGHT CLICK");
// //ShowRightClickMenu();
//} else {
// Debug.WriteLine("CLICK " + e.Button);
//}
private void codeListView_MouseDown(object sender, MouseEventArgs e) {
// MouseClick only fires for certain buttons and certain locations. MouseDown
// fires for all buttons so long as the pointer is in the codeListView area.
if (e.Button == MouseButtons.XButton1 && navigateBackToolStripButton.Enabled) {
navigateBackToolStripButton_Click(sender, e);
}
}
private void codeListView_MouseDoubleClick(object sender, MouseEventArgs e) {