Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

layout designer doesn't work for Razer Naga Trinity #5

Open
brian8267 opened this issue Dec 7, 2020 · 6 comments
Open

layout designer doesn't work for Razer Naga Trinity #5

brian8267 opened this issue Dec 7, 2020 · 6 comments

Comments

@brian8267
Copy link

Snake's main menu lists my Razer Naga Trinity correctly as far as I can tell, though I don't know what v1.2 is referring to, it's name and image are correct and the long hex matches the mouse's S/N. When I click to the lighting menu the only option under the Effects drop-down menu is Static. I'm not sure how many lights are in this mouse or other limitations but hopefully that can be expanded one day. Far below that in the bottom-left corner is a Design button that opens a Layout Designer. It doesn't seem possible for me to select or drag anything anywhere no matter if I click, make a selection rectangle, drag, etc. Nothing shows any sign of interactivity or drag-ability. When I click View I can select options from the Position drop-down menu which update the text on the left side of the screen to match the selected position so I know the drop-down is doing something, but nothing else seems to change unless I select BOTTOM, FRONT, or BACK, all of which make the image of the mouse disappear. Perhaps those three views are unsupported for this model and shouldn't be in the drop-down menu for it? TOP, SIDE_1, SIDE_2, THREE_D_1, and THREE_D_2 all show the same image identically so much so that I wouldn't think the menu was working except that it does change the left text to ThreeD 1 or similar as I change my drop-down selections. No matter what I try in various combinations of this UI, nothing is drag-able. The size slider works, the transparency slider works, toggling Monochrome doesn't seem to make anything grayscale coloring as I expected, instead makes the mouse image seem like I set it to 60% transparency. I've used snake for less than 30 minutes so perhaps I don't understand something.

snake version:

v1.0-SNAPSHOT-24/snake-installer-amd64.sh

openrazer version:

apt-cache policy openrazer-meta | head -n 2
openrazer-meta:
  Installed: 2.9.0~ubuntu20.04.1

OS version:

lsb_release --all
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 20.04.1 LTS
Release:	20.04
Codename:	focal

OS kernel version:

uname --kernel-release
5.4.0-56-generic
@brett-smith
Copy link
Collaborator

I haven't yet gotten around to written any documentation on the layout designer, so i'll give you a quick run down of what is supposed to happen here in the mean time.

Views

Unfortunately, it is not possible to know what views are available, because in effect there are now none by default. A recent change to OpenRazer means that they only ever return 1 image for a device (this is due to maintenance burn on their part actually finding good images). Part of the reason for layouts is to bring back this functionality. The ultimate idea is that users can create and share layouts.

So any views over and above Top that you create, you must find you own images for. Layouts can be exported as zip files for sharing that contain any images you added, copyright allowing of course!

You should also see a Matrix view, that is simply a grid. The size of this grid IS fixed and is provided by OpenRazer. The matrix view shows only LED components.

All views other than matrix have a background (as you have discovered) that can come from the internet or a local file (local files will be bundled into exported layouts). There is indeed a bug with monochrome filter, it seems to increase the transparency as well.

There different views may then be used in other areas of Snake.

  • Custom effects, you'll see a diagram of LEDs or Areas that may be lit.
  • Macros, you'll see a diagram of Keys that may be assigned
  • Device overview, will show Areas to control lighting regions, or Accessory to show macro profile control.

Editing

Each views editor allows 4 components types to be added, depending on the hardware.

  • Area - Some devices have multiple lighting regions, some just have a single one. You can create multiple regions regardless of how many there actually are if you just want to label a certain bit of the device.
  • LED - Maps to an individual LED on the device. There may be as little as one up to over a hundred in full size keyboards. Each LED maps to a coordinate in the matrix, and also assigns which Area it is in.
  • Button / Key - Maps to a press-able button or key, that may or may not also be mapped to an LED on the matrix. Here you provide the Linux input event code it will emit.
  • Accessory. Anything else. Currently used to place a Macro Profile control on the diagram for devices that support.

You select the component type in the area at the top left using the radio buttons. The icon to the right of the label near that radio button can then be dragged on to the diagram. If you can't drag any icons here, there must be a bug.

Once you have dragged element(s) to the diagram, you can then change the individual properties of each component in the Component tab. What is available will depend on the type of component.

The usual selection shortcuts for multiple selection should work, Ctrl+A, Ctrl+Click, Shift+Click, as should drawing a box.

That should be enough for now. This info will at some point be tidied up and put in the README.

Finally ...

A new version of Snake should be ready by this weekend. I have fixed a few layout editor related bugs, maybe this was already covered. I will review before publishing.

@thelegendofbrian
Copy link

thelegendofbrian commented Nov 15, 2021

It seems there is still an issue editing the views for the Naga Trinity. I put together a video to help illustrate the current experience. I can drag in an element into the diagram, but I don't appear to be able to select it in order to assign a function to it. None of the shortcuts for multiple selections which you mentioned seem to work either. Hope that helps.

SnakeLayout-2021-11-14_15.57.24.mp4

@brett-smith
Copy link
Collaborator

Thanks for the video, very helpful. Yeh, that's not what I'd expect to see. I have a feeling I may know the issue here though, I suspect it is a problem with i18n resources for the layout designer that shows itself when a device that has BACKLIGHT region exists (which I believe these mice do). This is already fixed, but a release is a couple of weeks away as I am in the middle of some changes to the update system.

In the meantime, you could confirm this by running snake from a terminal so you can see console output. Hopefully there will be some error output if you then go to the layout designer.

@thelegendofbrian
Copy link

In the meantime, you could confirm this by running snake from a terminal so you can see console output. Hopefully there will be some error output if you then go to the layout designer.

https://gist.github.com/thelegendofbrian/8b3bb2c5c5e9dd7ce4e2513fac80476a#file-snake-output-L45
This exception (line 45) was generated upon pressing the "Button / Key" radio button. I don't typically run it manually, so there's a possibility I'm not exactly starting it in the right context or something because I got an error in the UI which I don't normally get (see bottom picture). If you want me to clear out previous settings or do anything to assist with testing, let me know. I'm pretty jazzed about this project.

image

@brett-smith
Copy link
Collaborator

This exception (line 45) was generated upon pressing the "Button / Key" radio button. I don't typically run it manually, so there's a possibility I'm not exactly starting it in the right context or something because I got an error in the UI which I don't normally get (see bottom picture). If you want me to clear out previous settings or do anything to assist with testing, let me know.

Ok yeh, thats a separate issue. It looks like macrolib macro system has been activated. This happens when snake has permission to read/write /dev/uinput, so perhaps that is now accessable where it was not before? This also (currently) expects bamf-daemon to be installed, which it appears it is not. This daemon is used to monitor which window is currently in the foreground for macro profiles that are activated for specific applications. I have an alternative version that uses libwnck but it is buggy and not ready for prime time yet. So the fix here for now is to install the bamf-daemon package if it is available on your distro. If this is on Ubuntu or derivative that should be easily obtainable.

The other error you are getting with the actual designer is not the one I expected, but nonetheless the trace you provided will be useful, and I should be able to get a fix for this in the next update.

I'm pretty jazzed about this project.

Great to hear :) Once you've got a good layout for this device I'd love to add it permanently to Snake. After all, this particular feature is going to need good tools and enthusiastic contributors!

@thelegendofbrian
Copy link

So the fix here for now is to install the bamf-daemon package if it is available on your distro.

That got rid of this exception just like you said:
org.freedesktop.dbus.errors.ServiceUnknown: The name org.ayatana.bamf was not provided by any .service files

Great to hear :) Once you've got a good layout for this device I'd love to add it permanently to Snake. After all, this particular feature is going to need good tools and enthusiastic contributors!

I definitely plan to provide a layout when the time is right.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants