Beginner friendly Debian package for custom keyboard layout?

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
1
down vote

favorite
1












I have a custom keyboard layout that I want to install like this:



$sudo apt install my-custom-kbd-layout



Is this possible with Debian?



Because I started writing some python script to automate the manual steps, but maybe I'm over complicating things. Is there a better way?



Edit: removed code







share|improve this question






















  • This looks like a code-review question.
    – Stan Strum
    Jan 3 at 17:43










  • The code is for reference here, not for reviewing.
    – aliopi
    Jan 4 at 12:15






  • 1




    I don’t know much about package control, but If guess you could do 2 things, assuming it is not the code that is the problem. 1) push this to an official/unofficial repository (make sure it is added to the repo list) and download it with apt, or 2) since it is Python, maybe you can reserve a PIP package specifically for this.
    – Stan Strum
    Jan 4 at 16:27






  • 1




    I'd recommend you see how the package keyboards-rg does it (apt-get source keyboards-rg) and copy it.
    – angus
    Jan 5 at 6:26






  • 1




    possible, yes. beginner friendly, no. ... i went into a brief discussion of one possible solution on a similar question on askubuntu. you might not want to submit your customizations to the official package, but could use that to make your own patch for a local build of xkb-data that includes your changes.
    – quixotic
    Jan 9 at 4:40















up vote
1
down vote

favorite
1












I have a custom keyboard layout that I want to install like this:



$sudo apt install my-custom-kbd-layout



Is this possible with Debian?



Because I started writing some python script to automate the manual steps, but maybe I'm over complicating things. Is there a better way?



Edit: removed code







share|improve this question






















  • This looks like a code-review question.
    – Stan Strum
    Jan 3 at 17:43










  • The code is for reference here, not for reviewing.
    – aliopi
    Jan 4 at 12:15






  • 1




    I don’t know much about package control, but If guess you could do 2 things, assuming it is not the code that is the problem. 1) push this to an official/unofficial repository (make sure it is added to the repo list) and download it with apt, or 2) since it is Python, maybe you can reserve a PIP package specifically for this.
    – Stan Strum
    Jan 4 at 16:27






  • 1




    I'd recommend you see how the package keyboards-rg does it (apt-get source keyboards-rg) and copy it.
    – angus
    Jan 5 at 6:26






  • 1




    possible, yes. beginner friendly, no. ... i went into a brief discussion of one possible solution on a similar question on askubuntu. you might not want to submit your customizations to the official package, but could use that to make your own patch for a local build of xkb-data that includes your changes.
    – quixotic
    Jan 9 at 4:40













up vote
1
down vote

favorite
1









up vote
1
down vote

favorite
1






1





I have a custom keyboard layout that I want to install like this:



$sudo apt install my-custom-kbd-layout



Is this possible with Debian?



Because I started writing some python script to automate the manual steps, but maybe I'm over complicating things. Is there a better way?



Edit: removed code







share|improve this question














I have a custom keyboard layout that I want to install like this:



$sudo apt install my-custom-kbd-layout



Is this possible with Debian?



Because I started writing some python script to automate the manual steps, but maybe I'm over complicating things. Is there a better way?



Edit: removed code









share|improve this question













share|improve this question




share|improve this question








edited Jan 8 at 10:43

























asked Jan 3 at 17:21









aliopi

1387




1387











  • This looks like a code-review question.
    – Stan Strum
    Jan 3 at 17:43










  • The code is for reference here, not for reviewing.
    – aliopi
    Jan 4 at 12:15






  • 1




    I don’t know much about package control, but If guess you could do 2 things, assuming it is not the code that is the problem. 1) push this to an official/unofficial repository (make sure it is added to the repo list) and download it with apt, or 2) since it is Python, maybe you can reserve a PIP package specifically for this.
    – Stan Strum
    Jan 4 at 16:27






  • 1




    I'd recommend you see how the package keyboards-rg does it (apt-get source keyboards-rg) and copy it.
    – angus
    Jan 5 at 6:26






  • 1




    possible, yes. beginner friendly, no. ... i went into a brief discussion of one possible solution on a similar question on askubuntu. you might not want to submit your customizations to the official package, but could use that to make your own patch for a local build of xkb-data that includes your changes.
    – quixotic
    Jan 9 at 4:40

















  • This looks like a code-review question.
    – Stan Strum
    Jan 3 at 17:43










  • The code is for reference here, not for reviewing.
    – aliopi
    Jan 4 at 12:15






  • 1




    I don’t know much about package control, but If guess you could do 2 things, assuming it is not the code that is the problem. 1) push this to an official/unofficial repository (make sure it is added to the repo list) and download it with apt, or 2) since it is Python, maybe you can reserve a PIP package specifically for this.
    – Stan Strum
    Jan 4 at 16:27






  • 1




    I'd recommend you see how the package keyboards-rg does it (apt-get source keyboards-rg) and copy it.
    – angus
    Jan 5 at 6:26






  • 1




    possible, yes. beginner friendly, no. ... i went into a brief discussion of one possible solution on a similar question on askubuntu. you might not want to submit your customizations to the official package, but could use that to make your own patch for a local build of xkb-data that includes your changes.
    – quixotic
    Jan 9 at 4:40
















This looks like a code-review question.
– Stan Strum
Jan 3 at 17:43




This looks like a code-review question.
– Stan Strum
Jan 3 at 17:43












The code is for reference here, not for reviewing.
– aliopi
Jan 4 at 12:15




The code is for reference here, not for reviewing.
– aliopi
Jan 4 at 12:15




1




1




I don’t know much about package control, but If guess you could do 2 things, assuming it is not the code that is the problem. 1) push this to an official/unofficial repository (make sure it is added to the repo list) and download it with apt, or 2) since it is Python, maybe you can reserve a PIP package specifically for this.
– Stan Strum
Jan 4 at 16:27




I don’t know much about package control, but If guess you could do 2 things, assuming it is not the code that is the problem. 1) push this to an official/unofficial repository (make sure it is added to the repo list) and download it with apt, or 2) since it is Python, maybe you can reserve a PIP package specifically for this.
– Stan Strum
Jan 4 at 16:27




1




1




I'd recommend you see how the package keyboards-rg does it (apt-get source keyboards-rg) and copy it.
– angus
Jan 5 at 6:26




I'd recommend you see how the package keyboards-rg does it (apt-get source keyboards-rg) and copy it.
– angus
Jan 5 at 6:26




1




1




possible, yes. beginner friendly, no. ... i went into a brief discussion of one possible solution on a similar question on askubuntu. you might not want to submit your customizations to the official package, but could use that to make your own patch for a local build of xkb-data that includes your changes.
– quixotic
Jan 9 at 4:40





possible, yes. beginner friendly, no. ... i went into a brief discussion of one possible solution on a similar question on askubuntu. you might not want to submit your customizations to the official package, but could use that to make your own patch for a local build of xkb-data that includes your changes.
– quixotic
Jan 9 at 4:40











1 Answer
1






active

oldest

votes

















up vote
4
down vote



accepted










Package keyboards-rg provides several keyboard layouts aimed at Eastern European users. By examining its source (retrieve it with apt-get source keyboards-rg) you can see what files you need to provide, what to put in the debian/ directory, etc.






share|improve this answer




















  • I'll put the url to source in case someone else is interested packages.debian.org/stretch/keyboards-rg
    – aliopi
    Jan 5 at 17:33











  • For other people who want to make a keyboard package, I found this excellent answer here superuser.com/a/1168603, which confirms what I hoped would not be. Because I use Gnome, I can't avoid editing the evdev.lst and evdev.xml files. Why is this a problem? Because system updates will overwrite my change. The other problem is that I have to write a script to insert the snippets for my custom keyboard at the right place, without deleting other custom edits or breaking something. Very complicated, I was hoping a "plugin" style architecture was possible.
    – aliopi
    Jan 8 at 10:36











  • There is another problem with the setxkbmap aproach, it completely overrides my Gnome settings. So if I have de activated in Gnome and then do setxkbmap xy, xy will be active in every window or terminal but Gnome still shows de as active. Switching keyboards in Gnome with Win + Space I can see the keyboard symbols switching but actually nothing happens; I expected it would override the setxkbmap xy command.
    – aliopi
    Jan 8 at 10:56











  • @aliopi Once you manage to do it, please write a better answer and assign it to you. It'll be an asset for the site.
    – angus
    Jan 8 at 16:18






  • 1




    @aliopi the answer you link mentions disabling gnome's settings daemon if you prefer the setxkbmap approach. you do need to understand setxkbmap needs all the layouts you want: you'll need setxkbmap -layout de,xy to get both layouts. on the other hand, if you make changes to the system files correctly you'll be able to use gnome's builtin handling.
    – quixotic
    Jan 9 at 4:39










Your Answer







StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "106"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
convertImagesToLinks: false,
noModals: false,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);








 

draft saved


draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f414589%2fbeginner-friendly-debian-package-for-custom-keyboard-layout%23new-answer', 'question_page');

);

Post as a guest






























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes








up vote
4
down vote



accepted










Package keyboards-rg provides several keyboard layouts aimed at Eastern European users. By examining its source (retrieve it with apt-get source keyboards-rg) you can see what files you need to provide, what to put in the debian/ directory, etc.






share|improve this answer




















  • I'll put the url to source in case someone else is interested packages.debian.org/stretch/keyboards-rg
    – aliopi
    Jan 5 at 17:33











  • For other people who want to make a keyboard package, I found this excellent answer here superuser.com/a/1168603, which confirms what I hoped would not be. Because I use Gnome, I can't avoid editing the evdev.lst and evdev.xml files. Why is this a problem? Because system updates will overwrite my change. The other problem is that I have to write a script to insert the snippets for my custom keyboard at the right place, without deleting other custom edits or breaking something. Very complicated, I was hoping a "plugin" style architecture was possible.
    – aliopi
    Jan 8 at 10:36











  • There is another problem with the setxkbmap aproach, it completely overrides my Gnome settings. So if I have de activated in Gnome and then do setxkbmap xy, xy will be active in every window or terminal but Gnome still shows de as active. Switching keyboards in Gnome with Win + Space I can see the keyboard symbols switching but actually nothing happens; I expected it would override the setxkbmap xy command.
    – aliopi
    Jan 8 at 10:56











  • @aliopi Once you manage to do it, please write a better answer and assign it to you. It'll be an asset for the site.
    – angus
    Jan 8 at 16:18






  • 1




    @aliopi the answer you link mentions disabling gnome's settings daemon if you prefer the setxkbmap approach. you do need to understand setxkbmap needs all the layouts you want: you'll need setxkbmap -layout de,xy to get both layouts. on the other hand, if you make changes to the system files correctly you'll be able to use gnome's builtin handling.
    – quixotic
    Jan 9 at 4:39














up vote
4
down vote



accepted










Package keyboards-rg provides several keyboard layouts aimed at Eastern European users. By examining its source (retrieve it with apt-get source keyboards-rg) you can see what files you need to provide, what to put in the debian/ directory, etc.






share|improve this answer




















  • I'll put the url to source in case someone else is interested packages.debian.org/stretch/keyboards-rg
    – aliopi
    Jan 5 at 17:33











  • For other people who want to make a keyboard package, I found this excellent answer here superuser.com/a/1168603, which confirms what I hoped would not be. Because I use Gnome, I can't avoid editing the evdev.lst and evdev.xml files. Why is this a problem? Because system updates will overwrite my change. The other problem is that I have to write a script to insert the snippets for my custom keyboard at the right place, without deleting other custom edits or breaking something. Very complicated, I was hoping a "plugin" style architecture was possible.
    – aliopi
    Jan 8 at 10:36











  • There is another problem with the setxkbmap aproach, it completely overrides my Gnome settings. So if I have de activated in Gnome and then do setxkbmap xy, xy will be active in every window or terminal but Gnome still shows de as active. Switching keyboards in Gnome with Win + Space I can see the keyboard symbols switching but actually nothing happens; I expected it would override the setxkbmap xy command.
    – aliopi
    Jan 8 at 10:56











  • @aliopi Once you manage to do it, please write a better answer and assign it to you. It'll be an asset for the site.
    – angus
    Jan 8 at 16:18






  • 1




    @aliopi the answer you link mentions disabling gnome's settings daemon if you prefer the setxkbmap approach. you do need to understand setxkbmap needs all the layouts you want: you'll need setxkbmap -layout de,xy to get both layouts. on the other hand, if you make changes to the system files correctly you'll be able to use gnome's builtin handling.
    – quixotic
    Jan 9 at 4:39












up vote
4
down vote



accepted







up vote
4
down vote



accepted






Package keyboards-rg provides several keyboard layouts aimed at Eastern European users. By examining its source (retrieve it with apt-get source keyboards-rg) you can see what files you need to provide, what to put in the debian/ directory, etc.






share|improve this answer












Package keyboards-rg provides several keyboard layouts aimed at Eastern European users. By examining its source (retrieve it with apt-get source keyboards-rg) you can see what files you need to provide, what to put in the debian/ directory, etc.







share|improve this answer












share|improve this answer



share|improve this answer










answered Jan 5 at 16:18









angus

8,79113332




8,79113332











  • I'll put the url to source in case someone else is interested packages.debian.org/stretch/keyboards-rg
    – aliopi
    Jan 5 at 17:33











  • For other people who want to make a keyboard package, I found this excellent answer here superuser.com/a/1168603, which confirms what I hoped would not be. Because I use Gnome, I can't avoid editing the evdev.lst and evdev.xml files. Why is this a problem? Because system updates will overwrite my change. The other problem is that I have to write a script to insert the snippets for my custom keyboard at the right place, without deleting other custom edits or breaking something. Very complicated, I was hoping a "plugin" style architecture was possible.
    – aliopi
    Jan 8 at 10:36











  • There is another problem with the setxkbmap aproach, it completely overrides my Gnome settings. So if I have de activated in Gnome and then do setxkbmap xy, xy will be active in every window or terminal but Gnome still shows de as active. Switching keyboards in Gnome with Win + Space I can see the keyboard symbols switching but actually nothing happens; I expected it would override the setxkbmap xy command.
    – aliopi
    Jan 8 at 10:56











  • @aliopi Once you manage to do it, please write a better answer and assign it to you. It'll be an asset for the site.
    – angus
    Jan 8 at 16:18






  • 1




    @aliopi the answer you link mentions disabling gnome's settings daemon if you prefer the setxkbmap approach. you do need to understand setxkbmap needs all the layouts you want: you'll need setxkbmap -layout de,xy to get both layouts. on the other hand, if you make changes to the system files correctly you'll be able to use gnome's builtin handling.
    – quixotic
    Jan 9 at 4:39
















  • I'll put the url to source in case someone else is interested packages.debian.org/stretch/keyboards-rg
    – aliopi
    Jan 5 at 17:33











  • For other people who want to make a keyboard package, I found this excellent answer here superuser.com/a/1168603, which confirms what I hoped would not be. Because I use Gnome, I can't avoid editing the evdev.lst and evdev.xml files. Why is this a problem? Because system updates will overwrite my change. The other problem is that I have to write a script to insert the snippets for my custom keyboard at the right place, without deleting other custom edits or breaking something. Very complicated, I was hoping a "plugin" style architecture was possible.
    – aliopi
    Jan 8 at 10:36











  • There is another problem with the setxkbmap aproach, it completely overrides my Gnome settings. So if I have de activated in Gnome and then do setxkbmap xy, xy will be active in every window or terminal but Gnome still shows de as active. Switching keyboards in Gnome with Win + Space I can see the keyboard symbols switching but actually nothing happens; I expected it would override the setxkbmap xy command.
    – aliopi
    Jan 8 at 10:56











  • @aliopi Once you manage to do it, please write a better answer and assign it to you. It'll be an asset for the site.
    – angus
    Jan 8 at 16:18






  • 1




    @aliopi the answer you link mentions disabling gnome's settings daemon if you prefer the setxkbmap approach. you do need to understand setxkbmap needs all the layouts you want: you'll need setxkbmap -layout de,xy to get both layouts. on the other hand, if you make changes to the system files correctly you'll be able to use gnome's builtin handling.
    – quixotic
    Jan 9 at 4:39















I'll put the url to source in case someone else is interested packages.debian.org/stretch/keyboards-rg
– aliopi
Jan 5 at 17:33





I'll put the url to source in case someone else is interested packages.debian.org/stretch/keyboards-rg
– aliopi
Jan 5 at 17:33













For other people who want to make a keyboard package, I found this excellent answer here superuser.com/a/1168603, which confirms what I hoped would not be. Because I use Gnome, I can't avoid editing the evdev.lst and evdev.xml files. Why is this a problem? Because system updates will overwrite my change. The other problem is that I have to write a script to insert the snippets for my custom keyboard at the right place, without deleting other custom edits or breaking something. Very complicated, I was hoping a "plugin" style architecture was possible.
– aliopi
Jan 8 at 10:36





For other people who want to make a keyboard package, I found this excellent answer here superuser.com/a/1168603, which confirms what I hoped would not be. Because I use Gnome, I can't avoid editing the evdev.lst and evdev.xml files. Why is this a problem? Because system updates will overwrite my change. The other problem is that I have to write a script to insert the snippets for my custom keyboard at the right place, without deleting other custom edits or breaking something. Very complicated, I was hoping a "plugin" style architecture was possible.
– aliopi
Jan 8 at 10:36













There is another problem with the setxkbmap aproach, it completely overrides my Gnome settings. So if I have de activated in Gnome and then do setxkbmap xy, xy will be active in every window or terminal but Gnome still shows de as active. Switching keyboards in Gnome with Win + Space I can see the keyboard symbols switching but actually nothing happens; I expected it would override the setxkbmap xy command.
– aliopi
Jan 8 at 10:56





There is another problem with the setxkbmap aproach, it completely overrides my Gnome settings. So if I have de activated in Gnome and then do setxkbmap xy, xy will be active in every window or terminal but Gnome still shows de as active. Switching keyboards in Gnome with Win + Space I can see the keyboard symbols switching but actually nothing happens; I expected it would override the setxkbmap xy command.
– aliopi
Jan 8 at 10:56













@aliopi Once you manage to do it, please write a better answer and assign it to you. It'll be an asset for the site.
– angus
Jan 8 at 16:18




@aliopi Once you manage to do it, please write a better answer and assign it to you. It'll be an asset for the site.
– angus
Jan 8 at 16:18




1




1




@aliopi the answer you link mentions disabling gnome's settings daemon if you prefer the setxkbmap approach. you do need to understand setxkbmap needs all the layouts you want: you'll need setxkbmap -layout de,xy to get both layouts. on the other hand, if you make changes to the system files correctly you'll be able to use gnome's builtin handling.
– quixotic
Jan 9 at 4:39




@aliopi the answer you link mentions disabling gnome's settings daemon if you prefer the setxkbmap approach. you do need to understand setxkbmap needs all the layouts you want: you'll need setxkbmap -layout de,xy to get both layouts. on the other hand, if you make changes to the system files correctly you'll be able to use gnome's builtin handling.
– quixotic
Jan 9 at 4:39












 

draft saved


draft discarded


























 


draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f414589%2fbeginner-friendly-debian-package-for-custom-keyboard-layout%23new-answer', 'question_page');

);

Post as a guest













































































Popular posts from this blog

How to check contact read email or not when send email to Individual?

Displaying single band from multi-band raster using QGIS

How many registers does an x86_64 CPU actually have?