PianoView/PianoRoll: fixed keycodes for OS X

This patch enables the usage of PC keyboard for playing instrument piano
or piano roll on OS X by evaluating nativeVirtualKey rather than
nativeScanCode.
This commit is contained in:
Tobias Doerffel
2009-04-16 10:40:00 +02:00
parent b48fed891c
commit 6f0388be7c
3 changed files with 134 additions and 90 deletions

View File

@@ -1,7 +1,7 @@
/*
* piano.h - piano and pianoView, an interactive piano/keyboard-widget
*
* Copyright (c) 2004-2008 Tobias Doerffel <tobydox/at/users.sourceforge.net>
* Copyright (c) 2004-2009 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
*
@@ -77,7 +77,7 @@ public:
pianoView( QWidget * _parent );
virtual ~pianoView();
static int getKeyFromScancode( int _sc );
static int getKeyFromKeyEvent( QKeyEvent * _ke );
protected: