Home Download Buy Blog Forum Support

MultiBind - Simple multi-layered keybinding

Re: MultiBind - Simple multi-layered keybinding

Postby facelessuser on Mon Mar 18, 2013 3:22 pm

Here are my Calendar shortcuts. The one you want for inputting a certain date is calendar_lookup. The date format is month/day/year (I realize this is not the format in all countries, but this could probably be updated to be more configurable in the future.

    //////////////////////////////////////////////////////////////
// Calendar Shortcuts
//////////////////////////////////////////////////////////////
{
"keys": ["ctrl+super+alt+c"],
"command": "calendar"
},
{
"keys": ["ctrl+super+alt+shift+c"],
"command": "calendar_lookup"
},
{
"keys": ["alt+right"],
"command": "calendar_month_nav",
"context":
[
{
"key": "calendar_view"
}
],
"args": {"reverse": false}
},
{
"keys": ["alt+left"],
"command": "calendar_month_nav",
"context":
[
{
"key": "calendar_view"
}
],
"args": {"reverse": true}
},


I add this to my color scheme file to highlight days (granted I don't do anything with holidays yet, but in the future I plan on it.

        <dict>
<key>name</key>
<string>Calendar Selected Day</string>
<key>scope</key>
<string>selected_day</string>
<key>settings</key>
<dict>
<key>foreground</key>
<string>#2D2D2D</string>
<key>background</key>
<string>#F2777A</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>Calendar Holiday</string>
<key>scope</key>
<string>holiday</string>
<key>settings</key>
<dict>
<key>foreground</key>
<string>#2D2D2D</string>
<key>background</key>
<string>#66CCCC</string>
</dict>
</dict>



quodlibet wrote:Incidentally, there's a community-supported holiday dataset in various formats (for Taskwarrior) here: http://holidata.net/locale_index.htm.


NIce, it even comes in easy to parse formats. I will look into adding support for this.

If you want, open another thread so we can discuss this; I don't want to clutter up the authors plugin thread with unrelated discussion. I might just move calendar to a repo and open a thread myself...
facelessuser
 
Posts: 1446
Joined: Tue Apr 05, 2011 7:38 pm

Re: MultiBind - Simple multi-layered keybinding

Postby facelessuser on Mon Mar 18, 2013 9:52 pm

@quodlibet QuickCal thread is here viewtopic.php?f=5&t=11654&start=0
facelessuser
 
Posts: 1446
Joined: Tue Apr 05, 2011 7:38 pm

Re: MultiBind - Simple multi-layered keybinding

Postby C0D312 on Wed Mar 20, 2013 10:13 pm

Weird... I made something like this too. (It never really got fully fleshed out and was really buggy and tailored only to me so I never released it) Funny how everyone was thinking the same thing. Nice job.
C0D312
 
Posts: 1063
Joined: Sun Jul 10, 2011 3:23 am

Re: MultiBind - Simple multi-layered keybinding

Postby facelessuser on Thu Mar 21, 2013 3:49 am

Great minds think alike :) . I wouldn't be surprised though if more people don't eventually start buying into this because there are only so many free shortcuts...
facelessuser
 
Posts: 1446
Joined: Tue Apr 05, 2011 7:38 pm

Re: MultiBind - Simple multi-layered keybinding

Postby quodlibet on Fri Mar 22, 2013 9:57 pm

facelessuser wrote:Great minds think alike :) . I wouldn't be surprised though if more people don't eventually start buying into this because there are only so many free shortcuts...


It's also good to remember to rely on the palette rather than binding everything.
quodlibet
 
Posts: 458
Joined: Sat Jun 18, 2011 5:53 pm

Re: MultiBind - Simple multi-layered keybinding

Postby KonTrax on Thu Mar 28, 2013 11:23 pm

Update
I have rewritten the whole code. Still not 100% finished but its on git if someone was interested.

Will have to fill in with more information tomorrow as I'm barely awake. In short it's restructured and added support for basic dynamic/environmental/automatic barriers as seen in facelessuser's module
KonTrax
 
Posts: 46
Joined: Sun Mar 17, 2013 10:24 am

Re: MultiBind - Simple multi-layered keybinding

Postby KonTrax on Tue Apr 30, 2013 6:10 pm

I have made a quick example keymap section for MultiBind that enables quick wasd navigation (shift selection not added yet) and numbers acting as their shift / altgr counterparts on single click while maintaining numpad functionality.

NOTE: I am using a Norwegian keyboard layout but since it is mainly meant as an example for now It serves it's purpose.

BEFORE:
Code: Select all
click: 1 2 3 4 5 6 7 8 9 0
shift: ! " # ¤ % & / ( ) =
altgr:   @ £ $ €   { [ ] }


AFTER:
Code: Select all
click: ! " # $ % & / ( ) =
shift: ! @ £ ¤ € & { [ ] }
altgr:   @ £ $ €   { [ ] }


Gist url:
https://gist.github.com/KonTrax/5490205

Nordic keyboard layout image: (for reference)
http://www.qpad.se/uploads2/MK80/QPADMK80-NORDIC-Layout.png
KonTrax
 
Posts: 46
Joined: Sun Mar 17, 2013 10:24 am

Previous

Return to Plugin Announcements

Who is online

Users browsing this forum: No registered users and 7 guests