spiderbit / kodi-remote.el

Emacs Remote Control for Kodi
GNU General Public License v3.0
8 stars 4 forks source link

Thank you! New keymap? #5

Open stephenwithav opened 7 years ago

stephenwithav commented 7 years ago

Thank you, @spiderbit! I no longer need to open Chrome to control Kodi.

I redefined kodi-remote-keyboard-mode-map to match the VIM keys, f to toggle fullscreen, c for context menu, i for increase volume by 2, d to decrease volume by 2, and C-b for back.

Do you want a PR for that or are you comfortable with the current keymap?

spiderbit commented 7 years ago

Well I orientated my keys on the keyboard shortcuts you have when you use the keyboard on a default kodi instance.

What I also consider is that I use dvorak and I don't like keychords. so C-b seems not a good idea.

c seems to be standart keybinding f on the other hand is fast forward not fullscreen.

you can bind them manually of course.

I bound c to up cause in dvorak the equivalent to "ijkl" cross are the "chtn" keys, this is of course pretty specific, you could write a setting kodi-input-method, where you can set it to dvorak or qwerty and then use c for context menu for non-dvorak and "ijkl" instead of "chtn" for the direction keys.

I would add that, and maybe the key "j" for context menu which is c translated to dvorak.

Maybe it would be even possible to do that without a kodi specific setting but I am not shure find my dvorak setting with describe-language-environment:

Input methods: programmer-dvorak ("DVP@" in mode line) english-dvorak ("DV@" in mode line)

But I am not shure about that it would be easier to just add that kodi-remote setting for starters. So if you want to do that I would be happy to add that to accept a PR on that.

spiderbit commented 7 years ago

I have dvorak set on the Xorg settings but you can switch to dvorak also on the emacs level with select-input method. So its hard to really find out what the user uses. Because the input method inside emacs can be dvorak or the system settings.

And they even can collide, so I use dvorak on X level but german-postfix inside emacs, which is then still dvorak but translates ae to the german a with 2 dots on top of it :)

So a seperate kodi-input-method variable would be easier :)

maybe set default to "english" or "qwerty" and when set to dvorak: keys chtn and j are bound if not: keys ijkl and c are bound

to up / down left right and context menu.

stephenwithav commented 7 years ago

A kodi-input-method-like solution would definitely be easier. :)

I replaced C-b with b since there's no need for C- in a frequently used command.

Is this targeted at Emacs 24 or 25? (I use 24.3.)

spiderbit commented 7 years ago

I use 25.1 at the moment, but most of it was written with 24.3, and it should work with >= 24.x.

So you want to use b for what is bound on backspace at the moment? I use a keyboard where backspace is in the middle, so is that the problem with backspace?

Well it doesnt need to be orientated on the original kodi keyboard modell, I just thought somebody else made the work to think of a reasonable keyboard binding setting, so I did not think on a own thing.

I also have to say that my focus is more on the other modes cause I use primary a xbox controller to control my kodi instance, its just nice to stop or pause here and there a video or music when I code something.

As example you have spoken about the context menu, I can't remember that I have implemented that call, did you implement that? So as example I implemented the delete function in the at least series buffer, it would not be that hard to also make that for several lines / entries with one click. So thats more than I can do with the context menu.

Sadly thats not possible over the kodi api but I get the file name and path and if a tramp path to that computer is set it can be deleted with normal file operations.

I am not the biggest fan of the keyboard remote functionality. I used a usb keyboard before on my kodi box and for most operations a gamepad or a remote control is the better option.

Where the keyboard and remote emacs control is strong is when you see lokal lists and dont need to navigate the menu and if you want to write words.

of course the kodi-remote-keyboard mode is strong cause its mode-agnostic, so you can use all plugins with it etc.

I am maybe a bit to verbose here, I have a few ideas and even a few changes here that I did not commit yet, but I am not in the mood right now to finale that or complete the other tasks.

Especialy I try to reduce the redundandent code, and write it all a bit more abstract ( I already did that here localy), so the goal is that it will be easier to write more emacs modes for kodi modes. But yes they keyboard mode could use some love, so patches are welcome... I am right now a bit tired so maybe not the bist time to answer that.

But still I hope I answered your questions.

Also I should write a start buffer "kodi-remote" with a list of all implemented modes... but thats all such polish stuff, its hard to motivate to.

stephenwithav commented 7 years ago

Thank you for the explanation, @spiderbit.

kodi-remote-input-context-menu is defined here.

To be fair, I type with one of these, so the keymap I suggested is simply for convenience.

It is a vim-inspired keymap, though, so I thought it may be useful for others. The Dvorak layout explains your preference for cthn.

spiderbit commented 5 years ago

If there is more than 1 person that want some improvements or easy options to change to a different default keybinding I would be willing to consider it or accept patches.