I finally found a permament solution! For me, the way with xmodmap
worked only till the reboot. As I fount out later the xmodmap is
deprecated and exists just for compability. Well, here we go:

1) go to the xkb settings:
cd /usr/share/X11/xkb

2) now execute the following:
setxkbmap -print
you'll have something like this:
xkb_keymap {
        xkb_keycodes  { include "evdev+aliases(qwerty)" };
        xkb_types     { include "complete"      };
        xkb_compat    { include "complete+ledscroll(group_lock)"        };
        xkb_symbols   { include "pc+us+ru:2+inet(evdev)"        };
        xkb_geometry  { include "pc(pc105)"     };
};
look at your 'xkb_keycodes' line, the 'evdev' is name of needed file.

3) as we are at ' /usr/share/X11/xkb':
sudo nano keycodes/evdev
now you have to change this line:
<PRSC> = 107
to that:
<PRSC> = 218
or whatever code xev returns for you.
now find line like this:
<I218> = 218
and change that to:
alias <I218> = <PRSC>
now save the file.

4) copy your output at the 2nd step and save this to a file, for
example, /usr/share/X11/xkb/my

5) clear the cached compiled keymaps:
sudo rm -f /var/lib/xkb/*.xkm

6) compile your keymaps:
xkbcomp /usr/share/X11/xkb/my $DISPLAY
(you may have warnings, that's ok, but you don't want to get errors)
now try xev and press print screen, you shouldn't have the 'XKeysymToKeycode' 
string anymore. If so, reassign keys for screenshots in Ubuntu settings. By now 
you should be able to make screenshot with PrintScr key.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1295994

Title:
  Unable to use Printscreen Button on Ubuntu 14.04 in GNOME Shell

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/gnome-screenshot/+bug/1295994/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to