private void HandleKey(object sender, System.Windows.Forms.KeyEventArgs e) { switch (e.KeyCode) { // Move up & down one LINE at a time... case Keys.Down: ScrollByLineDelta(1); e.Handled = true; break; case Keys.Up: ScrollByLineDelta(-1); e.Handled = true; break; // Move up & down one PAGE at a time... case Keys.Next: ScrollByLineDelta(RowsAndColumns.Height); e.Handled = true; break; case Keys.Prior: ScrollByLineDelta(-RowsAndColumns.Height); e.Handled = true; break; // Move to beginning or end of heap case Keys.Home: ScrollToAddress(Reconstructor.Statistics.HeapAddressStart); e.Handled = true; break; case Keys.End: { uint rowsForHeap = iReconstructor.Statistics.HeapSize / BytesPerRow; uint rowsPerPage = (uint)RowsAndColumns.Height; uint targetRow = rowsForHeap - rowsPerPage + 1; uint address = Reconstructor.Statistics.HeapAddressStart + (targetRow * BytesPerRow); ScrollToAddress(address); e.Handled = true; break; } // Move one cell at a time case Keys.Right: { if (iFocusedCellKeyboard != null) { int index = Cells.CellIndex(iFocusedCellKeyboard); if (index + 1 < Cells.Count) { iFactory.PopupManager.PopupHide(); FocusedCell = Cells[index + 1]; e.Handled = true; } } break; } case Keys.Left: { if (iFocusedCellKeyboard != null) { int index = Cells.CellIndex(iFocusedCellKeyboard); if (index - 1 >= 0) { iFactory.PopupManager.PopupHide(); FocusedCell = Cells[index - 1]; e.Handled = true; } } break; } // Unhandled default: e.Handled = false; break; } }