Solved micro editor and keybinding issue

kpect

Member

Thanks: 8
Messages: 60

#1
Hello guys.

Recently I've bumped into interesting editor - micro. https://svnweb.freebsd.org/ports/head/editors/micro/
It has version 1.1.4 in ports, but I use 1.4.0 - https://github.com/zyedidia/micro/releases/download/v1.4.0/micro-1.4.0-freebsd64.tar.gz
I've played with it a bit and found out that some keybinding are not working in FreeBSD as well as on some Linux distros, and Created a bug request - https://github.com/zyedidia/micro/issues/1061
After that I've found that there is a solution for Linuxes how to fix that issue with keybindings - https://github.com/zyedidia/micro/wiki/Linux-Console-Keybindings
I've tried to reproduce the same workaround on FreeBSD using following commands:
# kbdcontrol -d > mykeys
Edited mykeys so that, for example, Cntrl+UP would become fkey65 (scancode for up is 95), Cntrl+Down would become fkey66 (scancode for down is 100), Cntrl+Left would become fkey67 (scancode for left is 97) and Cntrl+Right would become fkey68 (scancode for right is 98).
then
# kbdcontrol -l mykey (and check with kbdcontrol -d if new function keys are set)
then I try to do mapping with following commands on console:
Code:
# kbdcontrol -f 65 '\033[1;5A'
# kbdcontrol -f 66 '\033[1;5B'
# kbdcontrol -f 67 '\033[1;5D'
# kbdcontrol -f 68 '\033[1;5C'
But they simply don't work (on VT), and there are no any errors in output, though it's written in docs that they should.
How can I fix the issue and map the keys?

P.S.
I've also tried adding following instructions for my rxvt-unicode in .Xdefaults:
Code:
URxvt.keysym.M-Up:      \033[1;3A
URxvt.keysym.M-Down:    \033[1;3B
URxvt.keysym.M-Left:    \033[1;3D
URxvt.keysym.M-Right:   \033[1;3C
URxvt.keysym.C-Up:      \033[1;5A
URxvt.keysym.C-Down:    \033[1;5B
URxvt.keysym.C-Left:    \033[1;5D
URxvt.keysym.C-Right:   \033[1;5C
URxvt.keysym.S-Up:      \033[1;2A
URxvt.keysym.S-Down:    \033[1;2B
URxvt.keysym.S-Left:    \033[1;2D
URxvt.keysym.S-Right:   \033[1;2C
URxvt.keysym.C-S-Up:    \033[1;6A
URxvt.keysym.C-S-Down:  \033[1;6B
URxvt.keysym.C-S-Left:  \033[1;6D
URxvt.keysym.C-S-Right: \033[1;6C
URxvt.keysym.S-M-Up:    \033[1;4A
URxvt.keysym.S-M-Down:  \033[1;4B
URxvt.keysym.S-M-Left:  \033[1;4D
URxvt.keysym.S-M-Right: \033[1;4C
URxvt.keysym.C-M-Up:    \033[1;7A
URxvt.keysym.C-M-Down:  \033[1;7B
URxvt.keysym.C-M-Left:  \033[1;7D
URxvt.keysym.C-M-Right: \033[1;7C
That doesn't work either :(
 
Top