General XMetaL Discussion
wongsk27 July 1, 2013 at 6:53 am
Shift+Left key behaviour in tableJuly 1, 2013 at 6:53 amParticipants 2Replies 3Last Activity 9 years, 7 months ago
Does any body know how to change the Shift+Left key behaviour in table cell? I check the menu of XMetaL, at the moment, Shift+Left key is used as “Extend selected cell block by one cell to the left “, which is not what i want, I would like to use Shift+Left key to extend the selection one character to the left as the same as in the normal content.
-BrianDerek Read July 2, 2013 at 5:39 pm
Reply to: Shift+Left key behaviour in tableJuly 2, 2013 at 5:39 pm
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 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.wongsk27 July 17, 2013 at 12:52 am
Reply to: Shift+Left key behaviour in tableJuly 17, 2013 at 12:52 am
Thanks for the reply, Derek. I understand that when there is content inside the table cell, it will select the character on the left of the cursor, however, I discovered it only works in tag on view. If I am in the normal view, and I press shift + Left arrow, the application select the whole table cell instead of the character on the left of the cursor. The application seems to perform different action between tag on view and normal view. I only have problem with normal view, but not tag on view. Is this a bug?
- You must be logged in to reply to this topic.