LINUX.ORG.RU

Autokey + Gnome Shell - не работает клавиатура

 , , ,


1

1

Доброй ночи всем! Прошу помочь решить проблему:

  • юзаю Ubuntu 13.04 на Dell latitude xt2. экран у ноута сенсорный, удобен при повороте
  • для поворота использую утилиту Autokey, с помощью ее при нажатии кнопки поворота запускается скрипт. Его мне помогли создать вот в этой теме. На Unity все работает отлично
  • а вот при установке Gnome Shell случается трабл - если Autokey запушена - не работает клавиатура, курсор помигивает при нажатии, а клавиши не работают. Причем одно странно - в поиске в меню приложений клавиатура работает, в других приложениях - нет. Только выключаешь Autokey - клавиатура начинает работать.
  • скажите - есть ли способ решения, чтоб и Autokey и клавиатура работала в Gnome? Перейти на Юнити не могу и не хочу - не удобен он мне.

Буду благодарен каждому, кто поможет решить проблему!



Последнее исправление: CYB3R (всего исправлений: 2)

Ответ на: комментарий от Extraterrestrial

я бы не против обойтись без «костылей», но определить код клавиши не могу - уже писал об этом и никто реально не помог. + Самому не хватает знаний для «ковыряния» в конфигах. Вот и начал искать доступные решения. Сам нашел AutoKey, мне помогли создать скрипт - и он работает, но сама программа в Gnome Shell создает проблемы.

Если я делаю поворот через дефолтные настройки Gnome - все ок, клавиша определяется как 095, ввожу команду

xrandr -o left
- но экран при нажатии не поворачивается.

badazimer
() автор топика
Ответ на: комментарий от badazimer

а как с ним работать. Не поделитесь ссылкой на простую и понятную инструкцию?

Запускаешь:

xbindkeys -k
в появившемся окне жмешь нужную кнопку/клавишу. В консоли появится «болканка» для нового правила, например:
"(Scheme function)"
    m:0x4 + c:54
    Control + c
открываешь в текстовом редакторе файл ls ~/.xbindkeysrc, добавляешь туда эту болванку и заменяешь (Scheme function) на путь к скрипту. Например:
"/home/user/.local/bin/rotate.sh"
    m:0x4 + c:54
    Control + c
Дальше просто запускаешь xbindkeys без параметров и если все работает, то добавляешь в автозапуск. Если у тебя эта клавиша не определяется, то может и не сработать.

Black_Roland ★★★★
()
Ответ на: комментарий от Black_Roland
gor@gor-Latitude-XT2:~$ xbindkeys -k
Error : /home/gor/.xbindkeysrc not found or reading not allowed.
please, create one with 'xbindkeys --defaults > /home/gor/.xbindkeysrc'.
or, if you want scheme configuration style,
with 'xbindkeys --defaults-guile > /home/gor/.xbindkeysrc.scm'.
gor@gor-Latitude-XT2:~$ 
badazimer
() автор топика
Ответ на: комментарий от Extraterrestrial

где я могу найти тут код клавиши? :

gor@gor-Latitude-XT2:~$ xev
Outer window is 0x3200001, inner window is 0x3200002

PropertyNotify event, serial 8, synthetic NO, window 0x3200001,
    atom 0x27 (WM_NAME), time 560139, state PropertyNewValue

PropertyNotify event, serial 9, synthetic NO, window 0x3200001,
    atom 0x22 (WM_COMMAND), time 560139, state PropertyNewValue

PropertyNotify event, serial 10, synthetic NO, window 0x3200001,
    atom 0x28 (WM_NORMAL_HINTS), time 560139, state PropertyNewValue

CreateNotify event, serial 11, synthetic NO, window 0x3200001,
    parent 0x3200001, window 0x3200002, (10,10), width 50, height 50
border_width 4, override NO

PropertyNotify event, serial 14, synthetic NO, window 0x3200001,
    atom 0x15a (WM_PROTOCOLS), time 560139, state PropertyNewValue

MapNotify event, serial 15, synthetic NO, window 0x3200001,
    event 0x3200001, window 0x3200002, override NO

ConfigureNotify event, serial 26, synthetic NO, window 0x3200001,
    event 0x3200001, window 0x3200001, (0,0), width 178, height 178,
    border_width 0, above 0x2c00034, override NO

PropertyNotify event, serial 26, synthetic NO, window 0x3200001,
    atom 0x20b (_NET_WM_ALLOWED_ACTIONS), time 560141, state PropertyNewValue

ReparentNotify event, serial 26, synthetic NO, window 0x3200001,
    event 0x3200001, window 0x3200001, parent 0x1201768,
    (0,0), override NO

PropertyNotify event, serial 26, synthetic NO, window 0x3200001,
    atom 0x162 (_NET_WM_DESKTOP), time 560158, state PropertyNewValue

PropertyNotify event, serial 26, synthetic NO, window 0x3200001,
    atom 0x162 (_NET_WM_DESKTOP), time 560158, state PropertyNewValue

PropertyNotify event, serial 26, synthetic NO, window 0x3200001,
    atom 0x15f (_NET_FRAME_EXTENTS), time 560159, state PropertyNewValue

ConfigureNotify event, serial 26, synthetic NO, window 0x3200001,
    event 0x3200001, window 0x3200001, (10,31), width 178, height 178,
    border_width 0, above 0x0, override NO

PropertyNotify event, serial 26, synthetic NO, window 0x3200001,
    atom 0x189 (WM_STATE), time 560159, state PropertyNewValue

PropertyNotify event, serial 26, synthetic NO, window 0x3200001,
    atom 0x168 (_NET_WM_STATE), time 560159, state PropertyNewValue

PropertyNotify event, serial 26, synthetic NO, window 0x3200001,
    atom 0x18a (XKLAVIER_STATE), time 560163, state PropertyNewValue

ConfigureNotify event, serial 34, synthetic YES, window 0x3200001,
    event 0x3200001, window 0x3200001, (6,67), width 178, height 178,
    border_width 2, above 0x0, override NO

MapNotify event, serial 34, synthetic NO, window 0x3200001,
    event 0x3200001, window 0x3200001, override NO

VisibilityNotify event, serial 34, synthetic NO, window 0x3200001,
    state VisibilityUnobscured

Expose event, serial 34, synthetic NO, window 0x3200001,
    (0,0), width 178, height 10, count 3

Expose event, serial 34, synthetic NO, window 0x3200001,
    (0,10), width 10, height 58, count 2

Expose event, serial 34, synthetic NO, window 0x3200001,
    (68,10), width 110, height 58, count 1

Expose event, serial 34, synthetic NO, window 0x3200001,
    (0,68), width 178, height 110, count 0

PropertyNotify event, serial 34, synthetic NO, window 0x3200001,
    atom 0x168 (_NET_WM_STATE), time 560168, state PropertyNewValue

FocusIn event, serial 34, synthetic NO, window 0x3200001,
    mode NotifyNormal, detail NotifyNonlinear

KeymapNotify event, serial 34, synthetic NO, window 0x0,
    keys:  0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   
           0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   

PropertyNotify event, serial 34, synthetic NO, window 0x3200001,
    atom 0x168 (_NET_WM_STATE), time 560168, state PropertyNewValue

PropertyNotify event, serial 34, synthetic NO, window 0x3200001,
    atom 0x168 (_NET_WM_STATE), time 560201, state PropertyNewValue

FocusOut event, serial 34, synthetic NO, window 0x3200001,
    mode NotifyGrab, detail NotifyAncestor

FocusIn event, serial 34, synthetic NO, window 0x3200001,
    mode NotifyUngrab, detail NotifyAncestor

KeymapNotify event, serial 34, synthetic NO, window 0x0,
    keys:  0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   
           0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   

EnterNotify event, serial 34, synthetic NO, window 0x3200001,
    root 0x83, subw 0x0, time 567707, (177,102), root:(185,171),
    mode NotifyNormal, detail NotifyAncestor, same_screen YES,
    focus YES, state 0

KeymapNotify event, serial 34, synthetic NO, window 0x0,
    keys:  2   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   
           0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   

MotionNotify event, serial 34, synthetic NO, window 0x3200001,
    root 0x83, subw 0x0, time 567707, (177,102), root:(185,171),
    state 0x100, is_hint 0, same_screen YES

MotionNotify event, serial 34, synthetic NO, window 0x3200001,
    root 0x83, subw 0x0, time 567715, (175,95), root:(183,164),
    state 0x100, is_hint 0, same_screen YES

MotionNotify event, serial 34, synthetic NO, window 0x3200001,
    root 0x83, subw 0x0, time 567723, (174,93), root:(182,162),
    state 0x100, is_hint 0, same_screen YES

MotionNotify event, serial 34, synthetic NO, window 0x3200001,
    root 0x83, subw 0x0, time 567731, (174,92), root:(182,161),
    state 0x100, is_hint 0, same_screen YES

MotionNotify event, serial 34, synthetic NO, window 0x3200001,
    root 0x83, subw 0x0, time 567739, (174,90), root:(182,159),
    state 0x100, is_hint 0, same_screen YES

MotionNotify event, serial 34, synthetic NO, window 0x3200001,
    root 0x83, subw 0x0, time 567748, (174,89), root:(182,158),
    state 0x100, is_hint 0, same_screen YES

MotionNotify event, serial 34, synthetic NO, window 0x3200001,
    root 0x83, subw 0x0, time 567755, (175,87), root:(183,156),
    state 0x100, is_hint 0, same_screen YES

MotionNotify event, serial 34, synthetic NO, window 0x3200001,
    root 0x83, subw 0x0, time 567763, (176,87), root:(184,156),
    state 0x100, is_hint 0, same_screen YES

LeaveNotify event, serial 34, synthetic NO, window 0x3200001,
    root 0x83, subw 0x0, time 567771, (179,87), root:(187,156),
    mode NotifyNormal, detail NotifyAncestor, same_screen YES,
    focus YES, state 0

EnterNotify event, serial 34, synthetic NO, window 0x3200001,
    root 0x83, subw 0x0, time 568196, (176,5), root:(184,74),
    mode NotifyNormal, detail NotifyAncestor, same_screen YES,
    focus YES, state 0

KeymapNotify event, serial 34, synthetic NO, window 0x0,
    keys:  2   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   
           0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   

MotionNotify event, serial 34, synthetic NO, window 0x3200001,
    root 0x83, subw 0x0, time 568196, (176,5), root:(184,74),
    state 0x100, is_hint 0, same_screen YES

MotionNotify event, serial 34, synthetic NO, window 0x3200001,
    root 0x83, subw 0x0, time 568203, (175,4), root:(183,73),
    state 0x100, is_hint 0, same_screen YES

MotionNotify event, serial 34, synthetic NO, window 0x3200001,
    root 0x83, subw 0x0, time 568211, (174,3), root:(182,72),
    state 0x100, is_hint 0, same_screen YES

MotionNotify event, serial 34, synthetic NO, window 0x3200001,
    root 0x83, subw 0x0, time 568219, (174,2), root:(182,71),
    state 0x100, is_hint 0, same_screen YES

MotionNotify event, serial 34, synthetic NO, window 0x3200001,
    root 0x83, subw 0x0, time 568227, (173,1), root:(181,70),
    state 0x100, is_hint 0, same_screen YES

MotionNotify event, serial 34, synthetic NO, window 0x3200001,
    root 0x83, subw 0x0, time 568243, (173,0), root:(181,69),
    state 0x100, is_hint 0, same_screen YES

LeaveNotify event, serial 34, synthetic NO, window 0x3200001,
    root 0x83, subw 0x0, time 568259, (173,-1), root:(181,68),
    mode NotifyNormal, detail NotifyAncestor, same_screen YES,
    focus YES, state 0

ClientMessage event, serial 34, synthetic YES, window 0x3200001,
    message_type 0x15a (WM_PROTOCOLS), format 32, message 0x158 (WM_DELETE_WINDOW)
gor@gor-Latitude-XT2:~$ 

badazimer
() автор топика
Ответ на: комментарий от badazimer

xbindkeys ничего не дает при нажатии клавиши(ничего не миняется, а значок с перечеркнутым снизу монитором все равно вылазит), индентифицирует только соседнюю:

gor@gor-Latitude-XT2:~$ xbindkeys -k
Press combination of keys or/and click under the window.
You can use one of the two lines after "NoCommand"
in $HOME/.xbindkeysrc to bind a key.
"(Scheme function)"
    m:0x100 + c:149
    NoSymbol
gor@gor-Latitude-XT2:~$ 

badazimer
() автор топика
Ответ на: комментарий от Black_Roland

еще вопрос - как формировать скрипт? Просто создаешь текстовый файл со сокращением .sh и ставишь туда команду

xrandr -o left
?

badazimer
() автор топика
Ответ на: комментарий от badazimer
#!/bin/sh
xrandr -o left

затем сохраняешь файл (.sh кстати не обязательно) и делаешь

chmod +x <путь_к_файлу>

Black_Roland ★★★★
()
Вы не можете добавлять комментарии в эту тему. Тема перемещена в архив.