From 0fc4013a04aa38eb5ef94776ed5656f1a7b50bdc Mon Sep 17 00:00:00 2001 From: Kuldeep Kumar Pal Date: Thu, 25 Dec 2025 20:18:49 +0530 Subject: [PATCH 1/2] adding comments support in examples --- src/btpt.cc | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/btpt.cc b/src/btpt.cc index c1b86a5..bddd147 100644 --- a/src/btpt.cc +++ b/src/btpt.cc @@ -119,6 +119,19 @@ bool BluetoothPageTurner::addDevice( */ QString line = in.readLine(); + + /* Support for Comments */ + /* Remove anything after a '#' character */ + line = line.section('#', 0, 0); + + /* Remove whitespace from start and end */ + line = line.trimmed(); + + /* If line is now empty, skip it */ + if (line.isEmpty()) { + continue; + } + QList parts = line.split(" ", QString::SkipEmptyParts); if (parts.size() != 4) { nh_log("invalid config line: %s", From 3b41442b314126a0b1c44018d9ae005b6fa76af4 Mon Sep 17 00:00:00 2001 From: Kuldeep Kumar Pal Date: Thu, 25 Dec 2025 20:37:51 +0530 Subject: [PATCH 2/2] adding examples/AB Shutter3 with comments --- examples/AB Shutter3 | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 examples/AB Shutter3 diff --git a/examples/AB Shutter3 b/examples/AB Shutter3 new file mode 100644 index 0000000..b1ce0a8 --- /dev/null +++ b/examples/AB Shutter3 @@ -0,0 +1,12 @@ +# Format: +# METHOD TYPE CODE VALUE +# +# COLUMN DEFINITIONS: +# 1. METHOD: The internal Kobo function to call. +# 2. TYPE: The Linux Input Event Type. Usually 'EV_KEY' for buttons or 'EV_ABS' for joysticks. +# 3. CODE: The specific button code. Examples: KEY_VOLUMEUP, KEY_VOLUMEDOWN, BTN_A, BTN_B +# 4. VALUE: The state of the button. +# 1 = Press (Trigger immediately when button goes down) +# 0 = Release (Trigger when button is let go) +# ------------------------------------------------------------------------------ +nextPage EV_KEY KEY_VOLUMEUP 0