Tux Guitar


  Forums : Help
Subject scroll down a page

Author Message
Post: May 6th 2008 at 10:02 PM

it seems that the keybindings override the default behaviour of the window to scroll down when pressing .
Is it possible to assign a key in the shortcuts menu so that the screen moves down (the next tab lines are shown)?

Back to Top
Post: May 6th 2008 at 10:31 PM

no, there isn't "actions" to allow the user scroll on tuxguitar.. so there isn't a keybinding available for that.

> it seems that the keybindings override the default behaviour..
mmm it can be depending on the OS defaults.
tuxguitar use this special keys (allways):
0 To 9, Insert/Delete, Backspace, UP, DOWN, LEFT, RIGHT

And set as default some shorcuts:

But i don't think any of that keys would used to "scroll" for any OS.
Allmost applications use "Page Up/Down" key for scroll while tuxguitar don't use that key as default.

I think, that "isn't" a default OS behaviour..
but is any kind of "Standard" used for allmost applications (like "Ctrl + z" to undo ).

Back to Top
Post: May 8th 2008 at 7:14 PM

The point is, I have installed the application (compiled version) on the eee pc.

Since the screen is smaller there can only be seen two tab lines. When I'm playing guitar I would like to move to the next screen with one key press.
(I don't like the playing mode for this usage).

Do you think that behaviour can be achieved by a custom plugin?

Back to Top
Post: May 9th 2008 at 9:19 AM

I've taken a look into the code ....

Is it possible that something like that is missing:
(sorry, code is only borrowed, I'm not familiar with the eclipse classes ...). But as I have seen in examples the composite expects a listener for the usage of the event?

sComposite.getVerticalBar().addListener (SWT.Selection, new Listener () {
public void handleEvent (Event e) {
Point location = composite.getLocation ();
location.y = -vBar.getSelection ();
composite.setLocation (location);

Back to Top
Post: May 18th 2008 at 4:28 PM


I pasted this code to the PrintPreview class and it worked on my PC. Now it's possible to scroll up and down using the PAGE_UP/DOWN keys. Will take a look on the normal editor composite later on .....
Maybe somebody can forward this to the developers ...

this.pageComposite.addKeyListener(new KeyAdapter(){

public void keyPressed(KeyEvent e) {
if((e.keyCode == SWT.PAGE_DOWN)||(e.keyCode == SWT.PAGE_UP)) {
ScrollBar vBar = PrintPreview.this.previewComposite.getVerticalBar();

int vScroll = vBar.getSelection();

if(e.keyCode == SWT.PAGE_DOWN) { vBar.setSelection(vScroll + SCROLL_INCREMENT); }
else { vBar.setSelection(vScroll - SCROLL_INCREMENT); }

updateScroll(); PrintPreview.this.pageComposite.redraw();



Back to Top