Page 1 of 1

Disable specific keyboard shortcut

Posted: 16 Sep 2013, 15:47
by Maggie
Hi,

I really like Porteus Kiosk, it does exactly what I want it to do... except for one small detail. I wish to disable the ctrl+shift+e keyboard shortcut because in Firefox, it allows to switch and close tabs, which I do not want. I did the following to attempt solving my problem :

Extracted ISO file;
Unsquashed 003-settings.xzm in base directory;
Copied the rc.xml file I found in etc/xdg/openbox to home/guest/.config/openbox (as was suggested in the comment at the beginning of rc.xml file, I had to create .config and .config/openbox since they didn't exist);
In rc.xml, I found these lines of code (lines 200 to 204) which seemed relevant for what I wanted to do :

<!-- Disable following keybindings for firefox -->
<keybind key="Menu F7 F11 A-F4 C-F4 C-n C-o C-w C-S-w C-s C-p C-q A-f A-v A-t A-h S-F2 C-S-k C-S-i C-S-m C-S-s S-F4 S-F5 S-F7 C-u C-S-j C-i C-S-p F6 A-F6 C-F6 S-F6 A-d C-j C-k C-l C-t">
<action name="Execute">
</action>
</keybind>

I added C-S-e at the end of the key string so it looked like this (there's no explanation in the file of how to identify the keys, but from looking at this I figured that Ctrl was C, Shift was S and that the keys were joined together by a dash) :

<keybind key="Menu F7 F11 A-F4 C-F4 C-n C-o C-w C-S-w C-s C-p C-q A-f A-v A-t A-h S-F2 C-S-k C-S-i C-S-m C-S-s S-F4 S-F5 S-F7 C-u C-S-j C-i C-S-p F6 A-F6 C-F6 S-F6 A-d C-j C-k C-l C-t C-S-e">

Then, I squashed 003-settings.xzm back and ran the make_iso.sh-org script to create the iso (make_iso.sh doesn't work for me, but this one does).

I'm certain that I took care of the squashing and iso creation properly, since another modification I made (it was in the prefs.js file for Firefox) worked just fine. But that Ctrl+Shift+e shortcut still works, so I must have done something wrong. I also tried modifying the rc.xml file in etc/xdg/openbox directly (I made it writable first, did the change and made it read-only again), but that didn't work either.

Can anyone help me please?

Re: Disable specific keyboard shortcut

Posted: 16 Sep 2013, 19:18
by Maggie
OK, I managed to make it work on my own. I tried editing both rc.xml files and it worked. Now I have my perfect kiosk! :Yahoo!:

If anyone else ever wants to achieve the same thing as me (disable keyboard shortcuts or keys that aren't already disabled), just do as I explained in my last post. Openbox's wiki helped me understand more on how this works : http://openbox.org/wiki/Help:Bindings#Key_bindings

If that helps anyone, then I'm happy.

Re: Disable specific keyboard shortcut

Posted: 17 Sep 2013, 10:53
by francois
Bonjour Maggie. Good for you. I am sure that you are really going to adopt porteus definitively. 8)