Page 1 of 1

WordStar shortcuts for Writer

Posted: Sat Jan 20, 2018 1:43 pm
by JeJe
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.

Re: WordStar shortcuts for Writer

Posted: Wed Mar 27, 2019 5:58 pm
by JeJe
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




Re: WordStar shortcuts for Writer

Posted: Sat Apr 06, 2019 2:09 pm
by JeJe
Scrolling code amended for whether rulers showing or not
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


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

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