Home Forums General XMetaL Discussion Shift+Left key behaviour in table Reply To: Shift+Left key behaviour in table

Derek Read

Reply to: Shift+Left key behaviour in table

If your table cell contains text then this shortcut does what you want. However, as soon as you reach the container element that represents the cell (td or entry depending on table type) then the cell is selected. This is the same as for any other element.

The macro to try to change this behaviour would be the following but it will just implement the behaviour already in place:


If you take the table rendering away and think about how XMetaL functions with other elements, what you are seeing is the equivalent of using Shift+Left on the following (or any other elements):

some text

some more| text

Assume the | is your cursor. You hold down Shift+Left arrow enough times to select the text “some more”. When you press Shift+Left arrow again the elements will be selected (first one then the previous one). That is just how XMetaL functions. There is no support for “discontiguous selections” (ie: selecting portions of two different elements without selecting both elements in their entirety) unless you are working in Plain Text view where there is no DOM.

Tables add some complexity to this because people are used to working with them in products like Excel so there is some special support for selections in tables that you cannot do in other types of content, including selecting table cells that are one above another or a “column” (which do not exist as a structure in the two main table models).

If you do not need to represent this [u]visually[/u] to your end users you might be able to create something using Ranges instead. You can have multiple Ranges in a document (and they are invisible) but you can only have one Selection.