Bug 314265 - Visual mode behaves strangely with neo2 keyboard layout
Summary: Visual mode behaves strangely with neo2 keyboard layout
Status: RESOLVED FIXED
Alias: None
Product: kate
Classification: Unclassified
Component: Vi Input Mode (show other bugs)
Version: 3.8.90
Platform: Chakra Linux
: NOR normal (vote)
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-02-01 20:19 UTC by Fabian
Modified: 2013-12-30 10:56 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Fabian 2013-02-01 20:19:31 UTC
The neo2 layout provides arrow keys on a fourth layer (see the image at http://www.neo-layout.org/ -> "Ebene 4"). Using those does work perfectly fine in general and specifically in normal Kate's vi mode's normal mode. However, it doesn't work at all in visual mode. That's because when in visual mode the modifier key (mod4) needed for layer 4 is pressed, Kate deletes the currently selected text, and leaves visual mode. xev gives the following output when pressing the modifier key:
KeyPress event, serial 35, synthetic NO, window 0xc00001,
    root 0xac, subw 0x0, time 23763779, (256,358), root:(1218,381),
    state 0x0, keycode 108 (keysym 0xfe11, ISO_Level5_Shift), same_screen YES,
    XKeysymToKeycode returns keycode: 94
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyRelease event, serial 35, synthetic NO, window 0xc00001,
    root 0xac, subw 0x0, time 23763882, (256,358), root:(1218,381),
    state 0x20, keycode 108 (keysym 0xfe11, ISO_Level5_Shift), same_screen YES,
    XKeysymToKeycode returns keycode: 94
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False


Reproducible: Always

Steps to Reproduce:
1. Use neo2 layout (setxkbmap de neo on most modern linux distributions)
2. Enter some text in kate
3. enter visual mode
4. press the mod4 key (on most keyboards it is AltGr)
Actual Results:  
The currently selected text is deleted.

Expected Results:  
No text is deleted. Using the arrow keys on layer 4 is possible.
Comment 1 Michal Humpula 2013-12-30 10:56:54 UTC
Git commit d6820b725de61227f2c373c876c2f4925ba76af4 by Michal Humpula.
Committed on 29/12/2013 at 20:19.
Pushed by michalhumpula into branch 'master'.

vi-mode: make AltGr enabled keyboards work

... mostly ...
Related: bug 329370
REVIEW: 114734

M  +6    -0    part/view/kateviewinternal.cpp
M  +15   -0    part/vimode/kateviinputmodemanager.cpp
M  +2    -0    part/vimode/kateviinputmodemanager.h
M  +1    -2    part/vimode/katevikeyparser.cpp
M  +0    -5    part/vimode/katevinormalmode.cpp
M  +44   -19   tests/vimode_test.cpp
M  +1    -0    tests/vimode_test.h

http://commits.kde.org/kate/d6820b725de61227f2c373c876c2f4925ba76af4