Post Reply 

Rebind pick mode keyboard shortcut

May 20, 2014, 19:31
Post: #1
Rebind pick mode keyboard shortcut
Greetings,

as the subject states, I'd like to rebind the default 'pick mode' shortcut (Ctrl) to e.g. Alt.
Unfortunately, the only option in the 'Keyboard shortcuts' GUI and in ~/.gimp config files is to rebind the color picker tool itself (which is pretty useless for my purpose).

As to why I need to rebind it - I use Kinesis Advantage keyboard for typing (and it has a really unconventional layout, which makes using default GIMP shortcuts a total pain) and Razer Orbweaver for rest and recreation (this one is sorta like a numpad'ish left side of a normal keyboard, with several other buttons slapped to the side). The latter doesn't have Control key at all - it is supposed to be used with Windows-only software for button remap, but I use GIMP in Linux only.

One option that comes to mind is to totally remap the buttons on the Orbweaver, but it's a lot of somewhat less-than-obvious work with chtonic CLI tools, so I'd like to avoid that if possible, hoping for a kind of a fix-that-disturbingly-inexplicable-line-in-a-file solution.

On a side note (hope you don't mind me bitching a bit about unrelated stuff), it's quite saddening that there are no keyboard shortcut profiles to customize and switch between in multi-user environment; being unable to rebind arrow keys is lamentable as well.

Using GIMP 2.8.10 compiled from source in OpenSUSE 13.1 with Openbox (limited KDE and Gnome tools availability).

Thanks in advance for whatever answer, hint or suggestion you could give.
Find all posts by this user
Quote this message in a reply
May 20, 2014, 20:04
Post: #2
RE: Rebind pick mode keyboard shortcut
Openbox is a pretty lightweight DE. Limited KDE tools, how limited?

a few options in PCLOS KDE

[Image: qpw495e.jpg]

That one works ctrl -> caps

now to change it back before it drives me mad Wink

** https://www.gimp-forum.net/ now answering questions**
Find all posts by this user
Quote this message in a reply
May 21, 2014, 18:11 (This post was last modified: May 21, 2014 18:42 by thisOneIsInfected.)
Post: #3
RE: Rebind pick mode keyboard shortcut
Thanks for your replies, oh benevolent beings of teh forum!

The cake, however, goes to setxkbmap. Particularly 'setxkbmap -device 13 -option altwin:ctrl_alt_win', where device number has been determined via 'xinput -list | grep -i key'
↳ Razer Razer Orbweaver id=13 [slave keyboard (3)]

I honestly looked around GIMP source file with grep and stuff, weeped a little, damned my intellectual deficiency, reread your posts, stared blankly at the screen for a while and settled on the way described above.

Unfortunately, to my knowledge KDE's system settings keyboard tuning doesn't match well with IBus which I use. Can't say for sure, nor have the dedication to download and install the whole unholy batch of KDE libs to test this.

Anyway, seeing how your answers have led me to solution, I'd like to express my deepest gratitude. Stay alive!

UPD: okay, it wasn't as nice as it seemed to be. Setxkbmap disregards the -device key and applies the option to all keyboards. Looking into it now.
Find all posts by this user
Quote this message in a reply
May 21, 2014, 18:49
Post: #4
RE: Rebind pick mode keyboard shortcut
maybe

man modxmap

** https://www.gimp-forum.net/ now answering questions**
Find all posts by this user
Quote this message in a reply
May 22, 2014, 18:07 (This post was last modified: May 22, 2014 18:08 by thisOneIsInfected.)
Post: #5
RE: Rebind pick mode keyboard shortcut
Rich2005, I think you've meant xmodmap. Anyway, as far as I can tell it also applies to all keyboard devices.

There is a possible solution in creating a separate InputDevice section in xorg.conf with xkboptions set to whatever needed, but for now I settled on a simpler solution, i.e. switching this mapping back and forth via a short bash script, provided below.

Code:
if [[ -z `setxkbmap -query | grep -i options` ]]; then
    setxkbmap -option altwin:ctrl_alt_win
    notify-send "Switched Alt ---> Ctrl"
else
    setxkbmap -option ''
    notify-send "Reset setxkbmap options"
fi

Not the most elegant solution, but it works somewhat for me, I guess.
Find all posts by this user
Quote this message in a reply
May 22, 2014, 18:13
Post: #6
RE: Rebind pick mode keyboard shortcut
Quote:Rich2005, I think you've meant xmodmap

yep, dyslexia rules, KO

** https://www.gimp-forum.net/ now answering questions**
Find all posts by this user
Quote this message in a reply
Post Reply 


Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  jpg thumbnail displays landscape mode makitso 1 202 Aug 10, 2018 05:35
Last Post: paynekj
  Mac Keyboard delete key not working as intended Vigneron 1 239 Jul 30, 2018 06:26
Last Post: paynekj
  pick color and use renato07 1 470 Feb 22, 2018 15:24
Last Post: paynekj
  command button changes mode during command "C" Terry50 1 335 Dec 29, 2017 04:50
Last Post: ythgilb
  Pressure sensitivity pen left click shortcut dogjake10 0 567 Jun 25, 2017 19:58
Last Post: dogjake10

Forum Jump:


GIMP ForumPortalArchiveContactTermsRSS