Adding keyboard shortcut

I want to add the Delete action to ctrl-d, preferably in all components
but most importantly in Writer. When I use Tools -> Customize -> Keyboard
there is no 'delete' action available to assign to ctrl-d. There are abundant
delete-<something> actions, but not the same action as produced by the Del
key.

   Please show me how I can make ctrl-d act the same as Del.

TIA,

Rich

Rich Shepard wrote

I want to add the Delete action to ctrl-d, preferably in all components
but most importantly in Writer. When I use Tools -> Customize -> Keyboard
there is no 'delete' action available to assign to ctrl-d. There are
abundant
delete-
<something>
actions, but not the same action as produced by the Del
key.

   Please show me how I can make ctrl-d act the same as Del.

The *delete* you want is assigned in LibreOffice via the "Backspace"
function, aka a *rubout*.

In Tools -> Customize: Keyboard tab, select the Ctrl+d key--then search in
the Functions field for "backspace", then click on Modify. The Ctrl+D key
will drop double underline and take on Backspace. Both it and the Backspace
key will now show that function.

Not quite. The backspace key deletes the character to the left of the
cursor's position while the Del key deletes the character to the right of
the cursor's position. I want to make ctrl-d function like the Del key.

Thanks,

Rich

Hi :slight_smile:
The crucial part is at the end of Stuart's email. Apparently you can
modify the action of "backspace" by following his advice.
Regards from
a Tom :slight_smile:

Hi :slight_smile:
The crucial part is at the end of Stuart's email. Apparently you can
modify the action of "backspace" by following his advice.
Regards from
a Tom :slight_smile:

Rich doesn't want to modify Backspace; he doesn't want to do anything
with backspace.

He doesn't want to modify Delete either; he simply wants to assign an
additional key to have the same action (i.e. Delete, *not* Backspace)

Rich Shepard wrote

The *delete* you want is assigned in LibreOffice via the "Backspace"
function, aka a *rubout*.

   Not quite. The backspace key deletes the character to the left of the
cursor's position while the Del key deletes the character to the right of
the cursor's position. I want to make ctrl-d function like the Del key.

Yes sorry, that is correct. They are different deletions. The "Delete"
performs what is also called a "forward delete".
Have looked at the project source code. The forward delete action is among
a class of actions directly implemented in the edit shell and assigned to
the keyboard (symkey) for the Delete key.

It is not available to assign to additional Keyboard shortcut or menu
entry.

Doing so would require creation of an UNO commond to perform the deletion,
that would be available for use in UI customization.

Sorry.

That seems like something that should be corrected. What other actions
are directly implemented like that?

In the meantime, would it work to define a macro that does
forward-character and then backward-delete, and bind it to Ctrl-D?

- Robert

Dave Howorth <dave@howorth.org.uk> writes:

Hi :slight_smile:
The crucial part is at the end of Stuart's email. Apparently you can
modify the action of "backspace" by following his advice.
Regards from
a Tom :slight_smile:

Rich doesn't want to modify Backspace; he doesn't want to do anything
with backspace.

He doesn't want to modify Delete either; he simply wants to assign an
additional key to have the same action (i.e. Delete, *not* Backspace)

That action is called 'Delete Contents' (as you can see on the Del key in the list). However, if you assign ^D to this function, the Del key might lose it, unless this is working at the OS level. It seems that LO only allows at most one shortcut key for each function.

Creating a Macro that does do just that would introduce a (maybe) unwanted feature.

Executing this while the cursor is at the last position of a document, the forward-character wil do nothing, but the backward-delete will remove the last chaacter of your document (if any).