Date: prev next · Thread: first prev next last
2018 Archives by date, by thread · List index



On 9-12-2018 15:21, W. Robert J. Funnell, Prof. wrote:
On Sun, 9 Dec 2018, V Stuart Foote wrote:

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.
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

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).


--

For the interested people in the macro i used to test this:

sub testCtrlD
rem ----------------------------------------------------------------------
rem define variables
dim document   as object
dim dispatcher as object
rem ----------------------------------------------------------------------
rem get access to the document
document   = ThisComponent.CurrentController.Frame
dispatcher = createUnoService("com.sun.star.frame.DispatchHelper")

rem ----------------------------------------------------------------------
dim args1(1) as new com.sun.star.beans.PropertyValue
args1(0).Name = "Count"
args1(0).Value = 1
args1(1).Name = "Select"
args1(1).Value = false

dispatcher.executeDispatch(document, ".uno:GoRight", "", 0, args1())

rem ----------------------------------------------------------------------
dispatcher.executeDispatch(document, ".uno:SwBackspace", "", 0, Array())

rem ----------------------------------------------------------------------
rem dispatcher.executeDispatch(document, ".uno:MacroDialog", "", 0, Array())

end sub


--
To unsubscribe e-mail to: users+unsubscribe@global.libreoffice.org
Problems? https://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: https://wiki.documentfoundation.org/Netiquette
List archive: https://listarchives.libreoffice.org/global/users/
Privacy Policy: https://www.documentfoundation.org/privacy

Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.