Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/build_gnulinux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ jobs:
[[ "${QT_MAJOR_VERSION}" == 6 ]] # i.e. assert
sudo apt-get install qt6-base-dev
fi
sudo apt-get install libxkbcommon-dev

- name: install dependency Clang 19
if: "${{ matrix.cc == 'clang-19' }}"
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/build_macosx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:

- name: install dependencies
run: |
brew install xquartz libx11 qt@5 pkg-config
brew install xquartz libxkbcommon qt@5 pkg-config
brew link qt@5 --force
git clone --depth 1 https://github.com/FreeSpacenav/libspnav
cd libspnav
Expand All @@ -28,7 +28,7 @@ jobs:
sudo make install

- name: configure
run: CFLAGS=-I/usr/X11R6/include LDFLAGS=-L/usr/X11R6/lib ./configure
run: CFLAGS=-I/opt/homebrew/include LDFLAGS=-L/opt/homebrew/lib ./configure

- name: build
run: make
Expand Down
2 changes: 1 addition & 1 deletion Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ libpath = -L$(PREFIX)/lib
CFLAGS = $(warn) $(dbg) $(opt) $(incpath) -fPIC $(add_cflags) -MMD
CXXFLAGS = $(warn) $(dbg) $(opt) $(incpath) -fPIC $(cflags_qt) \
$(add_cflags) -MMD
LDFLAGS = $(libpath) $(libs_qt) -lspnav -lX11 $(add_ldflags)
LDFLAGS = $(libpath) $(libs_qt) -lspnav -lxkbcommon $(add_ldflags)

$(bin): $(obj)
$(CXX) -o $@ $(obj) $(LDFLAGS)
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ Installation
------------
First make sure you have the dependencies installed:
- libspnav v1.0 or higher
- libxkbcommon
- Qt 5 or Qt 6 (core, gui, and widgets)

To build just run `./configure`, `make`, and `make install` as usual.
Expand Down
10 changes: 5 additions & 5 deletions src/ui.cc
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "ui_about.h"
#include <QMessageBox>

#include <X11/Xlib.h>
#include <xkbcommon/xkbcommon.h>

static QSlider *slider_sens_axis[6];
static QCheckBox *chk_inv[6];
Expand Down Expand Up @@ -290,8 +290,8 @@ void MainWin::updateui()
bnrow[i].rad_action->setChecked(true);
}

char *str;
if(cfg.kbmap[i] > 0 && (str = XKeysymToString(cfg.kbmap[i]))) {
char str[64];
if(cfg.kbmap[i] > 0 && xkb_keysym_get_name(cfg.kbmap[i], str, sizeof str)) {
bnrow[i].rad_mapkey->setChecked(true);
bnrow[i].cmb_mapkey->setCurrentText(str);
}
Expand Down Expand Up @@ -640,8 +640,8 @@ void MainWin::combo_str_changed(const QString &qstr)
if(!str || !*str) return;

QLineEdit *ed = bnrow[i].cmb_mapkey->lineEdit();
KeySym sym = XStringToKeysym(str);
if(sym == NoSymbol) {
xkb_keysym_t sym = xkb_keysym_from_name(str, XKB_KEYSYM_NO_FLAGS);
if(sym == XKB_KEY_NoSymbol) {
QPalette cmap = def_cmb_cmap;
cmap.setColor(QPalette::Text, Qt::red);
ed->setPalette(cmap);
Expand Down
Loading