#41: Add load_keymap config entry, load a keymap as config.keymap.

This commit is contained in:
Bill Dengler 2015-05-16 01:13:54 -04:00
parent 40adacb32e
commit dc5d11c1c8
3 changed files with 55 additions and 4 deletions

View File

@ -13,6 +13,7 @@ play_ready_sound = boolean(default=True)
speak_ready_msg = boolean(default=True) speak_ready_msg = boolean(default=True)
log_level = string(default="error") log_level = string(default="error")
use_slow_audio_algo = boolean(default=False) use_slow_audio_algo = boolean(default=False)
load_keymap = string(default="default.keymap")
[keymap] [keymap]
up = string(default="control+win+up") up = string(default="control+win+up")

View File

@ -9,8 +9,11 @@ MAINFILE = "twblue.conf"
MAINSPEC = "app-configuration.defaults" MAINSPEC = "app-configuration.defaults"
app = None app = None
keymap=None
def setup (): def setup ():
global app global app
log.debug("Loading global app settings...") log.debug("Loading global app settings...")
app = config_utils.load_config(paths.config_path(MAINFILE), paths.app_path(MAINSPEC)) app = config_utils.load_config(paths.config_path(MAINFILE), paths.app_path(MAINSPEC))
log.debug("Loading keymap...")
global keymap
keymap = config_utils.load_config(paths.app_path("keymaps/"+app['app-settings']['load_keymap']), paths.app_path('keymaps/base.template'))

View File

@ -1,4 +1,51 @@
[info] [info]
name = "Default" name = Default
desc = "TWBlue's default keymap." desc = TWBlue's default keymap.
author = "Bill Dengler <codeofdusk@gmail.com>" author = Bill Dengler <codeofdusk@gmail.com>
[keymap]
up = control+win+up
down = control+win+down
left = control+win+left
right = control+win+right
next_account = control+win+shift+right
previous_account = control+win+shift+left
open_conversation = control+win+c
show_hide = control+win+m
post_tweet = control+win+n
post_reply = control+win+r
post_retweet = control+win+shift+r
send_dm = control+win+d
add_to_favourites = alt+win+f
remove_from_favourites = alt+shift+win+f
follow = control+win+s
user_details = control+win+alt+n
view_item = control+win+v
exit = control+win+f4
open_timeline = control+win+i
remove_buffer = control+win+shift+i
interact = control+win+return
url = control+win+alt+return
volume_up = control+win+alt+up
volume_down = control+win+alt+down
go_home = control+win+home
go_end = control+win+end
go_page_up = control+win+pageup
go_page_down = control+win+pagedown
update_profile = alt+win+p
delete = control+win+delete
clear_buffer = control+win+shift+delete
repeat_item = control+win+space
copy_to_clipboard = control+win+c
add_to_list = control+win+a
remove_from_list = control+win+shift+a
toggle_buffer_mute = control+win+shift+m
toggle_session_mute = alt+win+m
toggle_autoread = control+win+e
search = control+win+-
edit_keystrokes = control+win+k
view_user_lists = control+win+l
get_more_items = alt+win+pageup
reverse_geocode = control+win+g
view_reverse_geocode = control+win+shift+g
get_trending_topics = control+win+t