o355 / pitop-shortcutkeys

A guide to enabling the brightness & shortcut keys on the Pi-Top v1/v2
GNU General Public License v3.0
0 stars 0 forks source link

Shortcut keys reimplementation not necessary; temporary solutions for scaling issues; discussion to fix brightness issues #1

Open m-roberts opened 6 years ago

m-roberts commented 6 years ago

Hi there - Mike from pi-top here.

I would like to address a few things here, but essentially my point is a simple one: pt-input is a package that already exists on the Raspbian servers to do this. Install as you would normally:

sudo apt install pt-input

Commands can then be set in /etc/pi-top/pt-input/keyboard-commands. Here is an example entry in this configuration file:

{
    "id": {
        "keycode": 190,
        "name": "KEY_F20",
        "notes": ""
    },
    "commands": ["pt-brightness -d"]
},

This is not clear, I realise, and this visibility is something that we are working on (amongst other things). My goal is to get all of the code for hardware interaction to be open sourced; however, my time is limited and this is largely an endeavour of free time, so I apologise for the speed in getting this implemented.

Regarding your scaling issues (which I am taking to mean display scaling), is arising from pt-desktop, which is recommended by pt-device-manager to allow for messages such as low battery warnings to reach the desktop. However, this also includes a systemd service to scale the desktop UI - this is something that I am happy to look into, as I can appreciate that this is not necessarily desirable alongside a desktop messaging service.

The simplest solution is to install the hub support with the following command:

sudo apt install --no-install-recommends pt-hub

If you would like to install the desktop message service, but not have scaling, a short term fix would be to disable the service immediately after installing the software:

sudo apt install pt-hub
sudo systemctl disable pt-display

Regarding your inability to modify brightness (which thinks that it's stuck at 0), I would like to work to resolve this with you as this is not something that we have seen.

o355 commented 6 years ago

Thanks for the comments. I was having an issue with my Pi-Top where the battery level was stuck at 50 and brightness not changing, all seems good now. It fixed itself on Pi-Top OS, and I'm reliably getting sound/battery levels after multiple reboots. I'm going to try further testing on Raspbian 9 as soon as I can and get back to you within the next 2-3 days.

I didn't know of the existence of pt-input, but I think installing it with the pt-device-manager package and auto-configuring brightness keys is something myself among others would appreciate so we don't have to manually configure keys ourselves. Since I write the readme at 11pm, it completely blew over me that the dashboard key isn't the calculator key...

I appreciate you commenting on this silly repo, I'll make some changes to the readme and I applaud your efforts to make Pi-Top code open source for people to look at and even tinker with (e.g. custom boot sound).

m-roberts commented 6 years ago

My thoughts so far are to separate the desktop message service and the display scaling in pt-desktop (I will potentially introduce pt-display to handle scaling separately) and update pt-device-manager to recommend pt-input for installation (I will not make this a hard dependency, as this might not be desirable for all use cases).

Unfortunately, I can't implement this straight away, but I promise to take a look at this as soon as possible. Please let me know how you get on with Raspbian!

m-roberts commented 6 years ago

Update: https://github.com/pi-top/Device-Management/issues/9

I had forgotten that pt-input was built for Jessie (pi-topOS base until we have completed some further infrastructure improvements), not Stretch. I will look into resolving this.

m-roberts commented 6 years ago

Update: https://github.com/pi-top/Device-Management/issues/9 I have established a workaround. Please let me know if you need any more help for now.