def METHOD_NAME(self, viewer, data):
    if data['event'] == 'keydown' and data['key'] == 'm':
        row_info = self.coords_info.as_dict()
        if 'viewer' in self.table.headers_avail:
            row_info['viewer'] = viewer.reference if viewer.reference is not None else viewer.reference_id  # noqa
        for k in self.table.headers_avail:
            row_info.setdefault(k, self._default_table_values.get(k, ''))
        try:
            self.table.add_item({k: v for k, v in row_info.items()
                                 if k in self.table.headers_avail})
        except ValueError as err:
            raise ValueError(f'failed to add {row_info} to table: {repr(err)}')
        x, y = row_info['axes_x'], row_info['axes_y']
        self._get_mark(viewer).append_xy(getattr(x, 'value', x), getattr(y, 'value', y))