MohamadSaada / LogiGSK

A Linux based software package to control led's on Logitech G910, G810, G610 and G410.
GNU General Public License v3.0
112 stars 18 forks source link

Add azerty layout #5

Closed harmo closed 7 years ago

harmo commented 7 years ago

Only US and UK layouts are available, how to add more ?

MohamadSaada commented 7 years ago

Hi, could you please send a link to a picture of your keyboard so that I know which model and layout it is. If you want to contribute, you are more than welcome. In order to add a layout, there are a few main things you have to do (That I can think of).

  1. Create a class for your specific model and layout, you can see an example of this in the source code such as the G910SpectrumUSQWERTY Class. It's easy to write this class, you just need to create an image of your keyboards layout in in a way that all the white letter and symbol markings on that image are made transparent using GIMP, Photoshop or any other program (and please try to stick to the resolution used for other layouts, have a look at the .png files in the source). After you have finished the PNG image, use it in the class file, and align the JPanels with their corresponding keys. Please make sure that your select the appropriate keys for your model and layout. Make sure you change the code in your class file to suit your layout. And make sure that the class file you create abides by the template set in other layout class files.
  2. Add the corresponding code to use your class in the LogiGSK class, have a look at that class and you will know what to do.
  3. Add a layout enumeration such as KeyG910USQWERTY and make suitable additions in the Keyboard class.
  4. Check other classes to make sure you add your layout where other layouts are used. An example of this is to change the StarEffect class by adding your corresponding layout.

These are the main things that I can remember now. If I remember anything else I will add it later. If you need help please don't hesitate to ask. If you do find it too difficult to do yourself, just send me a link of your keyboards image and I will try my best and add it to the program as soon as I have sometime.

MohamadSaada commented 7 years ago

I think this issue is the same as other layout issues, and it hasn't been active for quite sometime, therefore I'm closing it and keeping only one active issue relating to layout implementation.