DeepSea-Developments / DeepDeck.Ahuyama.fw

Open-source 4x4 mechanical macropad based on ESP32
https://www.deepdeck.co
83 stars 28 forks source link

Copy/Paste work incorrectly #14

Open zhum opened 1 year ago

zhum commented 1 year ago

I've changed Layers order and added a copy of the first layer to make my custom. If I specify for any key (e.g. the first) KC_APP_COPY or KC_APP_PASTE, then on pressing this key I get temporary layer change (line 286 at keypress_handles.c). I cannot understand the logic of this file, so I cannot fix it. Is there any documentation about defines like PLUGIN_BASE_VAL, LAYER_HOLD_MAX_VAL, etc?

Also I think it is incorrect to duplicate their definitions across many files, the best way IMHO is to put all defines in one (well-documented) file and include it everywhere.

electronick-co commented 1 year ago

Hi @zhum ! I will check what's happening with the copy and paste, it was working but we have been changing many things with the code, so something might have happened. We are going to do a release today where we integrate a webserver so the configuration can be done graphically. Anyway is in the goals for this week improve the documentation so you can play with the code! I will let you know when the release is done, and also when we improve documentation. I will let this open and will get back to you when i figure out what happened with the copy and paste commands :+1:

zhum commented 1 year ago

Hello @electronick-co ! I've stashed my changes and updated up to v0.5.2_beta. Rebuild the project and flashed it. BUT. I still have my old keymaps! I tried even change the keymap names, but I still see my old custom keymap (and it behaves the same way). The only difference is I see 'app_mode' on the top of display now. Rebuildings and reflashes don't help...

How can I get rid of this?

Off topic: what does the physical switch on the top right corner of the device?

electronick-co commented 1 year ago

Hi @zhum !

Indeed the layers are stored in the memory, so you can update code without erasing them. (it's not a bug, it's a feature, hehe). In order to erase them you have to erase all the flash. To do so, in the vscode open the pallete (ctrl shift P) and write erase memory, an esp option should appear. With that the memory will be erased and then you can program the firmware again with the new code.

The switch is for the battery. DeepDeck does not comes with a battery but has all the circuits to work with one. On the discord group there are discussions about it and we are about to release info on the main webpage www.deepdeck.co.

Let me know if you have any other questions :)

zhum commented 1 year ago

Cool! It worked :) I've updated the firmware. But, I still have the same problem with copy/paste on the media layer - when I press COPY I see numpad layer (only while I press the key) and when I press PASTE - the Chrome layer... And no keypress is sent to the computer on these keys pressing. And a new "feature" added - when I press "right", USER1 layer is shown. Seems like constants overlapping somewhere.