"CTRL - DEL" keys combination delete TTMSFMXGrid cells content without the possibility of controlling it

Steps to reproduce issue:

  1. Given the following TTMSFMXGrid populated with some data
object sgLocal: TTMSFMXGrid
      Align = Client
      DisableFocusEffect = False
      EnableDragHighlight = False
      Locked = True
      Margins.Left = 10.000000000000000000
      Margins.Top = 10.000000000000000000
      Margins.Right = 10.000000000000000000
      Margins.Bottom = 10.000000000000000000
      PopupMenu = PopupMenuLocal
      TabOrder = 4
      OnKeyUp = sgLocalKeyUp
      Size.Width = 379.000000000000000000
      Size.Height = 471.000000000000000000
      Size.PlatformDefault = False
      FixedColumns = 0
      RowCount = 1
      SelectionMode = smDisjunctRow
      OnRawCompare = sgLocalRawCompare
      Options.Borders.CellBorders = bNone
      Options.Editing.Enabled = False
      Options.Editing.CalcFormat = '%g'
      Options.Grouping.CalcFormat = '%g'
      Options.Grouping.GroupCountFormat = '(%d)'
      Options.IO.XMLEncoding = 'ISO-8859-1'
      Options.Keyboard.InsertKeyHandling = ikhNone
      Options.Keyboard.DeleteKeyHandling = dkhNone
      Options.Lookup.Enabled = True
      Options.Lookup.Incremental = False
      Options.Mouse.WheelScrollKeepSelection = True
      Options.Mouse.ColumnSizing = True
      Options.Mouse.FixedColumnSizing = True
      Options.Mouse.ColumnAutoSizeOnDblClick = False
      Options.Mouse.RowAutoSizeOnDblClick = False
      Options.Mouse.TouchScrollingSensitivity = 0.100000001490116100
      Options.Printing.PageNumberFormat = '%g'
      Options.Styling.AdaptToStyle = True
      Options.Sorting.IgnoreCase = True
      Options.Sorting.Mode = gsmNormal
      Options.Sorting.Columns = scNormal
      AdaptToStyle = True
      Version = '2.3.3.8'
      Fill.Kind = Solid
      Stroke.Kind = Solid
      TopRow = 1
      LeftCol = 0
      ScrollMode = smPixelScrolling
      FixedShowSelection = False
      OnGetCellClass = sgLocalGetCellClass
      OnGetCellAppearance = sgLocalGetCellAppearance
      OnCanDeleteRow = sgLocalCanDeleteRow
      OnColumnSized = sgLocalColumnSized
      OnColumnSorted = sgLocalColumnSorted
      OnCanSortColumn = sgLocalCanSortColumn
      OnCellDblClick = sgLocalCellDblClick
      Columns = <
        item
          Color = claNull
          Editor = etEdit
          Fixed = False
          FixedFont.StyleExt = {00070000000000000004000000}
          FixedFontColor = claBlack
          FontColor = claBlack
          HorzAlignment = Center
          ID = ''
          Name = 'GCLocal'
          ReadOnly = True
          Width = 25.000000000000000000
          MinimumWidth = 25.000000000000000000
        end
        item
          Color = claNull
          Editor = etEdit
          Fixed = False
          FixedFont.StyleExt = {00070000000000000004000000}
          FixedFontColor = claBlack
          FontColor = claBlack
          ID = ''
          Name = 'SCLocalName'
          ReadOnly = True
          SortFormat = ssRaw
          Width = 100.000000000000000000
          MinimumWidth = 100.000000000000000000
        end
        item
          Color = claNull
          Editor = etEdit
          Fixed = False
          FixedFont.StyleExt = {00070000000000000004000000}
          FixedFontColor = claBlack
          FontColor = claBlack
          ID = ''
          Name = 'SCLocalDate'
          ReadOnly = True
          SortFormat = ssRaw
          Width = 95.000000000000000000
          MinimumWidth = 95.000000000000000000
        end
        item
          Color = claNull
          Editor = etEdit
          Fixed = False
          FixedFont.StyleExt = {00070000000000000004000000}
          FixedFontColor = claBlack
          FontColor = claBlack
          ID = ''
          Name = 'SCLocalType'
          ReadOnly = True
          SortFormat = ssRaw
          Width = 40.000000000000000000
          MinimumWidth = 40.000000000000000000
        end
        item
          Color = claNull
          Editor = etEdit
          Fixed = False
          FixedFont.StyleExt = {00070000000000000004000000}
          FixedFontColor = claBlack
          FontColor = claBlack
          ID = ''
          Name = 'SCLocalSize'
          ReadOnly = True
          SortFormat = ssRaw
          Width = 70.000000000000000000
          MinimumWidth = 70.000000000000000000
        end>
    end
  1. Cells are set to read only via column options.
  2. Keyboard.DeleteKeyHandling is set to dkhNone.
  3. OnCanDeleteRow procedure set Allow to False.
  4. Select some rows

On a Windows system:
6. Press "CTRL + DELETE"
On a macOS system:
6. Press " CTRL + DELETE" or "Command + DELETE"

ISSUE: Selected rows are cleared of content without triggering OnCanDeleteRow or other editing events (I've also tried to debug the edit related events)

How can somebody prevent this to happen. It seems to override any form of possible control.
I don't want read only grid cells to be deleted/emptied/cleared without having control over it.

Thank you in advance for any help you can provide.

Hi,

CTRL+DELETE is actually using a CutToClipboard action. You can monitor changes with the OnCellsChanged event, or you can simply disable it with Options.Clipboard.Enabled := False;