This is an unfinished (and slow plodding extension) for emulating WordStar shortcuts in Writer.
I've implemented some of them and have never had WordStar but have been using the jstar
text editor for how they function. So I may well have things not quite right.
The zip contains the extension, a keyboard configuration file (save your existing one first) and some instructions.
WordStar shortcuts for Writer
WordStar shortcuts for Writer
- Attachments
-
- Wordstar Shortcuts.zip
- (29.67 KiB) Downloaded 345 times
Windows 10, Openoffice 4.1.11, LibreOffice 7.4.0.3 (x64)
Re: WordStar shortcuts for Writer
For scrolling up and down these macros work for me in OOWriter:
Code: Select all
sub doLineDown()
doscrollEvent 0
end sub
sub doLineUp()
doscrollEvent 1
end sub
sub doScreenDown()
doscrollEvent 2
end sub
sub doScreenUp()
doscrollEvent 3
end sub
sub doscrollEvent(i)
comp =thiscomponent.currentcontroller.frame.getcomponentwindow
compchild=comp.getAccessibleContext.getAccessibleChild(0)
Vsbar=compchild.getAccessibleContext.getAccessibleChild(6)
Vsbar.getAccessibleContext.doAccessibleAction(i)
end sub
Windows 10, Openoffice 4.1.11, LibreOffice 7.4.0.3 (x64)
Re: WordStar shortcuts for Writer
Scrolling code amended for whether rulers showing or not
Note: I haven't put this code in the extension.
Edit: I mixed up the down and up integer values:corrected
Edit2: corrected screendown function - meant to be 3
Edit 3 note does not work in LibreOffice
Edit 4:
sub doscrollEvent version that seems to work for both LibreOffice and OpenOffice
Note: I haven't put this code in the extension.
Code: Select all
sub doLineUp()
doscrollEvent 0
end sub
sub doLineDown()
doscrollEvent 1
end sub
sub doScreenUp()
doscrollEvent 2
end sub
sub doScreenDown()
doscrollEvent 3
end sub
sub doscrollEvent(i)
comp =thiscomponent.currentcontroller.frame.getcomponentwindow
compchild=comp.getAccessibleContext.getAccessibleChild(0)
Vsbar=compchild.getAccessibleContext.getAccessibleChild(compchild.getAccessibleContext.getAccessibleChildcount -1)
Vsbar.getAccessibleContext.doAccessibleAction(i)
end sub
Edit2: corrected screendown function - meant to be 3
Edit 3 note does not work in LibreOffice
Edit 4:
sub doscrollEvent version that seems to work for both LibreOffice and OpenOffice
Code: Select all
sub doscrollEvent(i)
dim found as boolean
found = false
comp =thiscomponent.currentcontroller.frame.getcomponentwindow
compchild=comp.getAccessibleContext.getAccessibleChild(0)
on error resume next
for j = 0 to compchild.getAccessibleContext.getAccessibleChildcount -1
with compchild.getAccessibleContext.getAccessibleChild(j)
if .getAccessibleContext.getAccessibleName = "Vertical scroll bar" then found = true
if found then
.getAccessibleContext.doAccessibleAction(i)
exit for
end if
end with
next
end sub
Windows 10, Openoffice 4.1.11, LibreOffice 7.4.0.3 (x64)