Closed acornblue closed 3 years ago
I assume that you are using Solaar to turn off this gesture. If so, Solaar should remember this and every time the keyboard connects Solaar should turn off the gesture. Devices forget their gesture settings when they power off so Solaar has to set them up every time a device connects.
I have a K400, which I think is quite similar. If I run Solaar as solaar -dd
when I turn the keyboard off and on again I see lots of output, including the relevant part, which is:
12:27:49,244 DEBUG [ReceiverListener:hidraw1] logitech_receiver.settings: gesture2-gestures: apply {'1': True, '10': True, '2': True, '30': True, '34': False, '42': True, '43': True, '45': True, '64': False, '65': False, '67': False, '84': False} (<Device(1,404D,Wireless Touch Keyboard K400 Plus,132A9261)>)
12:27:49,244 DEBUG [ReceiverListener:hidraw1] logitech_receiver.settings: gesture2-gestures: settings read {'1': True, '10': True, '2': True, '30': True, '34': False, '42': True, '43': True, '45': True, '64': False, '65': False, '67': False, '84': False} from <Device(1,404D,Wireless Touch Keyboard K400 Plus,132A9261)>
12:27:49,245 DEBUG [ReceiverListener:hidraw1] logitech_receiver.settings: gesture2-gestures: settings write {'1': True, '10': True, '2': True, '30': True, '34': False, '42': True, '43': True, '45': True, '64': False, '65': False, '67': False, '84': False} to <Device(1,404D,Wireless Touch Keyboard K400 Plus,132A9261)>
12:27:49,245 DEBUG [ReceiverListener:hidraw1] logitech_receiver.settings: gesture2-gestures: settings prepare map write({'1': True, '10': True, '2': True, '30': True, '34': False, '42': True, '43': True, '45': True, '64': False, '65': False, '67': False, '84': False}) => [b'\x00\x01\xff\x7f', b'\x01\x01\x0f\x00']
12:27:49,245 DEBUG [ReceiverListener:hidraw1] logitech_receiver.base: (22) <= w[11 01 0D29 0001FF7F000000000000000000000000]
12:27:49,260 DEBUG [ReceiverListener:hidraw1] logitech_receiver.base: (22) => r[11 01 0D29 0001FF7F000000000000000000000000]
12:27:49,260 DEBUG [ReceiverListener:hidraw1] logitech_receiver.base: (22) <= w[11 01 0D2C 01010F00000000000000000000000000]
12:27:49,276 DEBUG [ReceiverListener:hidraw1] logitech_receiver.base: (22) => r[11 01 0D2C 01010F00000000000000000000000000]
The two-finger zoom (stateless) is number 84, which is the 11th gesture (out of 12) for this keyboard. Solaar is remembering that this was set to False. Solaar is setting gestures 1 through 7 to true and 8 to false (the first write, the FF7F) and gestures 9 through 12 false (the second write, the 0F00). You should be seeing something similar.
If you don't, run Solaar as solaar -dd
, turn your keyboard off and on, and post the lines that you see that correspond to the lines above.
Hoho! Thanks for responding. Looks like its working correctly when using the unifying reciever. However, when I connect via bluetooth, it does not apply the saved settings when reconnecting...
01:57:33,098 DEBUG [AsyncUI] logitech_receiver.settings: change-host: settings read NamedInt(1, '2:raspberrypi') from <Device(0,B353,Keyboard K600 TV,?)>
01:57:33,108 DEBUG [AsyncUI] logitech_receiver.settings: gesture2-gestures: settings read {'1': True, '10': True, '2': True, '30': True, '34': False, '4': True, '42': True, '43': True, '45': False, '5': True, '84': False} from <Device(0,B353,Keyboard K600 TV,?)>
01:57:33,116 DEBUG [AsyncUI] logitech_receiver.settings: gesture2-params: settings read {'4': {'scale': 256}} from <Device(0,B353,Keyboard K600 TV,?)>
01:57:33,126 DEBUG [MainThread] solaar.ui: status changed: <Device(0,B353,Keyboard K600 TV,?)> (NONE) None
It is possible that the keyboard presents a different set of features when connected via bluetooth. To check, please run solaar show
when the keyboard is connected via bluetooth. Also run when connected via the receiver for comparison.
Why am I guessing this? I've heard that it is possible.
If solaar show
doesn't show any differences, then we'll have to dig deeper. I'll need the full output with -dd
when connecting via bluetooth.
Also useful will be the contents of ~/.config/solaar/config.json
{
"4078:1C2C0D9F": {
"_modelId": "B35340780000",
"_name": "Keyboard K600 TV",
"_sensitive": {
"gesture2-gestures": true
},
"_unitId": "12B05578",
"disable-keyboard-keys": {
"1": false,
"16": false,
"8": false
},
"divert-keys": {
"183": 0,
"186": 0,
"189": 0,
"190": 0,
"199": 0,
"200": 0,
"209": 0,
"210": 0,
"211": 0,
"212": 0,
"213": 0,
"214": 0,
"228": 0,
"229": 0,
"230": 0,
"231": 0,
"232": 0,
"233": 0
},
"fn-swap": true,
"gesture2-gestures": {
"1": true,
"10": true,
"2": true,
"30": true,
"34": false,
"4": true,
"42": true,
"43": true,
"45": false,
"5": true,
"84": false
},
"gesture2-params": {
"4": {
"scale": 256
}
},
"multiplatform": 3
},
"4078:877E97F1": {
"_name": "Keyboard K600 TV"
},
"B35340780000:12B05578": {
"_modelId": "B35340780000",
"_name": "Keyboard K600 TV",
"_sensitive": {
"divert-keys": true,
"fn-swap": true,
"gesture2-gestures": true,
"gesture2-params": false,
"multiplatform": true
},
"_unitId": "12B05578",
"disable-keyboard-keys": {
"1": false,
"16": false,
"8": false
},
"divert-keys": {
"183": 0,
"186": 0,
"189": 0,
"190": 0,
"199": 0,
"200": 0,
"209": 0,
"210": 0,
"211": 0,
"212": 0,
"213": 0,
"214": 0,
"228": 0,
"229": 0,
"230": 0,
"231": 0,
"232": 0,
"233": 0
},
"fn-swap": true,
"gesture2-gestures": {
"1": true,
"10": true,
"2": true,
"30": true,
"34": false,
"4": true,
"42": true,
"43": true,
"45": false,
"5": true,
"84": false
},
"gesture2-params": {
"4": {
"scale": 256
}
},
"multiplatform": "3"
},
"_version": "1.0.5"
}
I see one problem already, which might be causing the problem you noticed. There are three entries in config.json that appear to be for your keyboard. That's not right, and something that should be addressed.
As you can see, there are differences in the output of solaar show
(33 vs 36 features), but nothing that should affect gestures.
Here is one thing that could be involved. You appear to be connecting to two different computers. What might be happening is that you changed the gesture on one computer but not on another. The two copies of Solaar each have different remembered settings. So when you connect to one computer the gesture is off but when you connect to the other the gesture is on.
To check, look at ~/.config/solaar/config.json on both computers and see what the value for"84" is under gestures2-gestures. If they are different, then this is your problem and you need to change the gesture on both computers. I'm going to update the Solaar documentation to discuss this.
Its actually just 1 computer. bt paired to easyswitch 2 unified receiver paired to easyswitch 1
I just tried deleting the config.json & tested again. The new config.json has only 1 config (bt). Issue still exist. I disable zoom with 2 fingers. Verified that it is off. Turn off the keyboard, wait a few seconds & turned it back on. It still does not re-apply saved settings.
I diffed the 2 output of solaar show
the gesture 2 are the exactly the same...
I notice the bt interface has no serial no...
OK, I'm seeing similar bad behaviour on my machine. I'm not sure what the underlying problem is. I'll get back to you when I know more.
Thanks looking into this & your patience. I haven't dabbled with programming tools in so long.
There was a bug that occurs when Solaar is started up with a device that is paired with a receiver but not connected to it. When the device becomes active through the receiver the saved configuration might not be associated with the device because the check to see if this is necessary can be masked by incorrect logic. I fixed this bug.
There also might be a problem that some devices are slow in responding to requests and thus don't provide enough information when their configuration is being searched for. I'm still investigating this problem.
The code that searches for saved configurations should be improved at bit.
I created a PR with the first fix and some debugging print statements. Please run PR #1105 in a way that you can capture its output. If the problem persists, post the output here.
To download and work with Solar
git clone https://github.com/pwr-Solaar/Solaar.git
cd Solaar
Run Solaar as bin/solaar from this directory.
To run PR #1105, first clone Solaar if you have not already done so and cd to the clone directory. The first time you download the pull request, fetch it into a new branch and checkout that branch, as in:
git fetch origin pull/1105/head:pull_1105
git checkout pull_1105
To download a new version of the pull request, fetch it and then set your pull branch to the new fetch, as in:
git checkout pull_1105
git fetch origin pull/1105/head
git reset --hard FETCH_HEAD
One thing you should do is to clean up ~/.config/solaar/config.json
The easiest way to clean up is to just remove the file, but you will loose your changed settings. Alternatively, you could remove extra entries. Do this while Solaar is not running.
I made sure solaar was not running & followed your instructions. Issue still exist. I did notice that if I quit & restart solaar it does apply save settings. Just need to trigger when powercycling the keyboard.
Note: timestamp 13:44:15,496 is when I turned the keyboard back on. I also waited a few minutes hoping that the code was laggy...
As far as I can see, Solaar is pushing on to this feature and there is nothing indicating that this gesture should be off. Please provide the output of solaar show
, a screenshot of the Solaar main window with the keyboard active, and the contents of ~/.config/solaar/config.json so that I can see what is going on.
Also, the main window should have the gesture section open and visible.
solaar show
config.json
Strange. Solaar show has Zoom2FingerStateless as True, but the config file has 84 (which is its number) as false.
Try this. Kill Solaar. Delete the config file. Run solaar show
and report back the lines
Gestures: {'1': True, '2': True, '4': True, '5': True, '30': True, '10': True, '45': False, '42': True, '43': True, '84': True, '34': False}
and
Zoom2FingerStateless Enabled ( 9): True
and the line in the config file
"84": true
(The T/F values might not be the same as here, of course.)
Then start Solaar, change the zoom setting, quit Solaar, and report back the same information.
Then turn your keyboard off and on and report back the same information.
What you should see is that the first reports all have one value, and the second and third all have the other value.
Here is the expected behaviour, just in case the problem is partly due to a misunderstanding.
Most Logitech devices have several settings that can be changed by Solaar. Logitech devices forget most of these changed settings when they are turned off or when they go into power-saving mode. Solaar keeps the settings that it has seen for a device in ~/.config/solaar/config.json and updates this file whenever it changes a setting. While the Solaar GUI is running (even with the main Solaar window closed), whenever a Logitech device connects (because it was turned on, comes out of power-saving modes, its receiver was plugged in, the device was plugged in, or the device changed hosts) Solaar takes the settings it remembers and applies them to the device. The Solaar GUI also does this for devices that are connected when it starts up.
So what should happen is that if you use the Solaar GUI to change a setting and you keep Solaar running that change will appear to persist. However if you quit Solaar, the next time the device forgets its settings and then reconnects the changed setting will revert back to its default value (unless it is one of the few settings that persist on the device). If you later start up the Solaar GUI, Solaar will apply settings from its config.json file and change the setting back to what it remembers.
If a setting is changed by some other means, such as via solaar config
or from the device itself, the Solaar GUI might not notice the change and when it applies its remembered settings the Solaar GUI will apply the setting value it remembered, not the more-recently-changed setting value.
Yes we are on the same page. Solaar works properly when the K600 is using the unified receiver. However when connected via bluetooth, it does not apply the saved settings when the keyboard is turned on. Restarting solaar will apply the saved settings when on bluetooth.
If you are running with PR #1105 and starting with no ~/.config/solaar/config.json then there is probably still some sort of bug remaining in Solaar. Please respond with the sequence of events that exhibits the bug, e.g., kill Solaar, remove config.json, turn keyboard off and on, connect keyboard via receiver, start Solaar, change setting, switch keyboard to bluetooth, notice that setting has changed to something else. Also provide a screenshot of the Solaar main screen and the contents of ~/.config/solaar/config.json at the point that you notice the problem.
I just saw a similar problem. This was due to my keyboard not responding correctly, but wasn't reproduceable. Fortunately, the output of Solaar in PR #1105 showed what was going wrong, so please also post the output of Solaar, particularly the GET IDS
lines.
I found something wrong in Solaar - two threads are trying to talk to the same device. This may be causing your problem, so only provide information if you want. I'll try to produce a fix for the problem that I have found.
I think I have fixed the bug. Could you download PR #1105 again and see whether your problem is still around? I've left in some debugging statements so if you encounter the bug, just post the output from Solaar.
@acornblue Have you had a chance to try the updated PR?
Closing as the fix as already been merged and there is no response from submitter.
Use case: disable "zoom with 2 fingers" gesture Power cycling keyboard or using "easy switch" will revert settings.
Also Solaar does not "refresh" current state of settings. I've tried closing & opening Solaar but it doesn't seem to repoll settings from the keyboard.
Solaar v1.0.5