A better way to save keymaps

This commit is contained in:
Manuel Cortez 2015-08-10 09:21:51 -05:00
parent a016932ac7
commit eb0cf62a54
6 changed files with 180 additions and 98 deletions

View File

@ -16,4 +16,4 @@ def setup ():
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'))
keymap = config_utils.load_config(paths.config_path("keymap.keymap"), paths.app_path("keymaps/"+app['app-settings']['load_keymap']))

View File

@ -34,7 +34,7 @@ class globalSettingsController(object):
if ".keymap" not in i:
continue
try:
res[config_utils.load_config(paths.app_path('keymaps/'+i))['info']['name']]=i
res[i[:-7]] =i
except:
log.exception("Exception while loading keymap " + i)
return res
@ -79,6 +79,8 @@ class globalSettingsController(object):
self.needs_restart = True
if self.kmnames[self.dialog.general.km.GetSelection()] != config.app["app-settings"]["load_keymap"]:
config.app["app-settings"]["load_keymap"] =self.kmnames[self.dialog.general.km.GetSelection()]
kmFile = open(paths.config_path("keymap.keymap"), "w")
kmFile.close()
self.needs_restart = True
if config.app["app-settings"]["use_invisible_keyboard_shorcuts"] != self.dialog.get_value("general", "use_invisible_shorcuts"):

View File

@ -0,0 +1,30 @@
[info]
name = string(default="Chicken Nugget")
desc = string(default="Remaps TWBlue shortcuts to their equivalents in Christopher Toth's Chicken Nugget Twitter client.")
author = string(default="Bill Dengler <codeofdusk@gmail.com>")
[keymap]
up = string(default="control+win+up")
down = string(default="control+win+down")
left = string(default="control+win+left")
right = string(default="control+win+right")
open_conversation = string(default="control+win+c")
show_hide = string(default="control+win+w")
post_tweet = string(default="control+win+t")
post_reply = string(default="control+win+r")
post_retweet = string(default="control+win+shift+t")
send_dm = string(default="control+win+d")
user_details = string(default="control+win+shift+u")
exit = string(default="control+win+q")
open_timeline = string(default="control+win+u")
remove_buffer = string(default="control+win+backspace")
audio = string(default="control+win+return")
url = string(default="control+win+b")
go_home = string(default="control+win+home")
go_end = string(default="control+win+end")
delete = string(default="control+win+delete")
clear_buffer = string(default="control+win+shift+delete")
repeat_item = string(default="control+win+space")
copy_to_clipboard = string(default="control+win+shift+c")
search = string(default="control+win+/")
find = string(default="control+win+shift+/")

View File

@ -1,48 +1,49 @@
[info]
name = Qwitter
desc = A keymap which emulates Qwitter as closely as possible.
author = Bill Dengler <codeofdusk@gmail.com>
name = string(default="Qwitter")
desc = string(default="A keymap which emulates Qwitter as closely as possible.")
author = string(default="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
show_hide = control+win+w
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+l
user_details = control+win+shift+;
view_item = control+win+v
exit = control+win+f4
open_timeline = control+win+i
remove_buffer = "control+win+'"
audio = control+win+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 = control+win+shift+p
delete = control+win+delete
clear_buffer = control+win+shift+delete
repeat_item = control+win+space
copy_to_clipboard = control+win+shift+c
add_to_list = control+win+alt+l
remove_from_list = control+win+alt+shift+l
toggle_buffer_mute = control+win+alt+m
toggle_session_mute = control+win+m
search = control+win+/
find = control+win+shift+/
edit_keystrokes = control+win+k
view_user_lists = win+alt+shift+l
reverse_geocode = control+win+g
view_reverse_geocode = control+win+shift+g
get_trending_topics = control+win+shift+t
up = string(default="control+win+up")
down = string(default="control+win+down")
left = string(default="control+win+left")
right = string(default="control+win+right")
next_account = string(default="control+win+shift+right")
previous_account = string(default="control+win+shift+left")
show_hide = string(default="control+win+w")
post_tweet = string(default="control+win+n")
post_reply = string(default="control+win+r")
post_retweet = string(default="control+win+shift+r")
send_dm = string(default="control+win+d")
add_to_favourites = string(default="alt+win+f")
remove_from_favourites = string(default="alt+shift+win+f")
follow = string(default="control+win+l")
user_details = string(default="control+win+shift+;")
view_item = string(default="control+win+v")
exit = string(default="control+win+f4")
open_timeline = string(default="control+win+i")
remove_buffer = '''string(default="control+win+'")'''
url = string(default="control+win+return")
audio = string(default="control+win+shift+return")
volume_up = string(default="control+win+alt+up")
volume_down = string(default="control+win+alt+down")
go_home = string(default="control+win+home")
go_end = string(default="control+win+end")
go_page_up = string(default="control+win+pageup")
go_page_down = string(default="control+win+pagedown")
update_profile = string(default="control+win+shift+p")
delete = string(default="control+win+delete")
clear_buffer = string(default="control+win+shift+delete")
repeat_item = string(default="control+win+space")
copy_to_clipboard = string(default="control+win+shift+c")
add_to_list = string(default="control+win+alt+l")
remove_from_list = string(default="control+win+alt+shift+l")
toggle_buffer_mute = string(default="control+win+alt+m")
toggle_session_mute = string(default="control+win+m")
search = string(default="control+win+/")
find = string(default="control+win+shift+/")
edit_keystrokes = string(default="control+win+k")
view_user_lists = string(default="win+alt+shift+l")
reverse_geocode = string(default="control+win+g")
view_reverse_geocode = string(default="control+win+shift+g")
get_trending_topics = string(default="control+win+shift+t")

View File

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

View File

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