1995eaton / chromium-vim

Vim bindings for Google Chrome.
https://chrome.google.com/webstore/detail/cvim/ihlenndgcmojhcghmfjfneahoeklbjjh
MIT License
2.25k stars 325 forks source link

cVim and non-english keyboard layout #387

Open einhander opened 9 years ago

einhander commented 9 years ago

cVim not works if I use keyboard layout different than english.

Ape commented 9 years ago

Related to #384.

1995eaton commented 8 years ago

Is it just some keys that don't work or all keys? Also, which layout are you using?

nasenatmer commented 8 years ago

@einhander I can't confirm this. I'm on bone and haven't got any problems with cvim. Are you talking about non-Latin keyboards?

einhander commented 8 years ago

@nasenatmer you are right I use non-latin keyboard layout (russian). @1995eaton all nonnumeric keys don't work, I use ru-winkeys layout. Do you need setxkbmap options what I use? OS: Debian testing 64-bit, chrome 47.0.2526.73

s-mage commented 8 years ago

In vim this problem usually solved by langmap command. It would be nice to see the same here.

" Cyrillic mapping
set langmap=ёйцукенгшщзхъфывапролджэячсмитьбюЁЙЦУКЕHГШЩЗХЪФЫВАПРОЛДЖЭЯЧСМИТЬБЮ;`qwertyuiop[]asdfghjkl\\;'zxcvbnm\\,.~QWERTYUIOP{}ASDFGHJKL:\\"ZXCVBNM<>
einhander commented 8 years ago

I'm think #384 will solve this issue.

s-mage commented 8 years ago

@einhander yes it solves, but langmap is more flexible. Plus in your keycode.js you're one step from it. As for me, commands only in latin are fine too.

1995eaton commented 8 years ago

Just pushed a langmap feature. Here are the settings for the languages you guys listed:

" Cyrillic
let langmap = "ёйцукенгшщзхъфывапролджэячсмитьбюЁЙЦУКЕHГШЩЗХЪФЫВАПРОЛДЖЭЯЧСМИТЬБЮ;`qwertyuiop[]asdfghjkl\\;'zxcvbnm\\,.~QWERTYUIOP{}ASDFGHJKL:\"ZXCVBNM<>"

" Arabic
let langmap = "«A»S،\\,؛'؟?ءVآHأBؤMإNئCاhبfة]تjثeج[حpخoدvذcرnزbسsشaصwضqطxظzعuغyـ`فtقrك\\;لgمlنkهiوmىDيdًWٌYٍRَQُTِEّIْU٠0١1٢2٣3٤4٥5٦6٧7٨8٩9٪%٫K٬L"

" Russian
let langmap = "Ё|АFБ<ВDГUДLЕTЖ:ЗPИBЙQКRЛKМVНYОJПGРHСCТNУEФAХ{ЦWЧXШIЩOЪ}ЫSЬMЭ\"Ю>ЯZаfб\\,вdгuдlеtж\\;зpиbйqкrлkмvнyоjпgрhсcтnуeфaх[цwчxшiщoъ]ыsьmэ'ю.яzё\\№#"

" Korean
let langmap = "ㄱrㄲRㄴsㄷeㄸEㄹfㅁaㅂqㅃQㅅtㅆTㅇdㅈwㅉWㅊcㅋzㅌxㅍvㅎgㅏkㅐoㅑiㅒOㅓjㅔpㅕuㅖPㅗhㅛyㅜnㅠbㅡm"

Let me know if this works. It's kind of hard to test this on my end without remapping my OS's keyboard settings.

s-mage commented 8 years ago

@1995eaton how to update the plugin to last version (installed from chrome webstore)?

1995eaton commented 8 years ago

@s-mage See the contributing section here: https://github.com/1995eaton/chromium-vim#contributing

You can skip the first two steps. The zip file of the latest release can be found here: https://github.com/1995eaton/chromium-vim/archive/master.zip

einhander commented 8 years ago

@1995eaton thank you. I've done some quick test on first Cyrillic langmap. It seams ok. BTW third langmap is not for Russian language, may be Bulgarian or something.

s-mage commented 8 years ago

@1995eaton thank you. Cyrillic langmap works. And @einhander is right, map that you call "russian" is not russian, it's something strange.

rishubil commented 8 years ago

@1995eaton I tested Korean langmap but it' not working for some characters

For instance, Korean character 'ㄱ (U+3131)' is mapped to 'r' and it could be changed uppercase character 'ㄲ (U+3132)' with shift key. So it can be mapped each character to ['r', 'R'], and it works well.

However, Korean character 'ㅎ (U+ffbe)' is mapped to 'g' and it works fine, but when I pressed the 'ㅎ (U+ffbe)' with shift key, it doesn't work like 'G'. it will work same as 'g' because there is no uppercase of 'ㅎ (U+ffbe)'.

In fact, only 7 characters have their uppercase and the rest 19 characters doesn't. So I think the langmap option cannot support the Korean layout perfectly.

s-kostyaev commented 8 years ago

@1995eaton cyrillic langmap works fine. But I can't use goBack (mapped on H) in english layout. After add this langmap to config I can use goBack only on russian layout. Other keys works fine on both layouts.

BorisB commented 7 years ago

@1995eaton I also confirm that cyrillic langmap works fine except goBack. Is there any walkaround for using H as a key for goBack now?

dinkonin commented 7 years ago

Hi I just want to confirm that langmap works and also wanted to post the Bulgarian Phonetic Traditional string:

  "Bulgarian Phonetic (Traditional)
  let langmap = "чявертъуиопшщюасдфгхйклзьцжбнмЧЯВЕРТЪУИОПШЩЮАСДФГХЙКЛЗѝЦЖБНМ;`qwertyuiop[]\\\asdfghjklzxcvbnm~QWERTYUIOP{}\\\ASDFGHJKLZXCVBNM"
KamiGim commented 6 years ago

Hi I just write langmap works for Thai so Thai people who want to use Thai keyboard can use this string

"Thai"
let langmap = "ๆq๐Qไw\"WำeฎEพrฑRะtธTัyํYีu๊UรiณIนoฯOยpญPบ[ล]ฟaฤAหsฆSกdฏDดfโFเgฌG้h็H่j๋JาkษKสlศLซ:ง'ผz(Zปx)XแcฉCอvฮVิbฺBืn์Nทm?Mฒ<ใ.ฬ>ฝ/ฦ?"