 (global-set-key (kbd "C-c C-t C-b t")   'tn-browse-target-value-in-twitter)
 (global-set-key (kbd "C-c C-t C-b w")   'tn-browse-target-value-in-wikipedia)
 (global-set-key (kbd "C-c C-t i")       'tn-target-info)
-(global-set-key (kbd "C-c C-t C-s ,")   'tn-decrease-target-sharability)
-(global-set-key (kbd "C-c C-t C-s .")   'tn-increase-target-sharability)
-(global-set-key (kbd "C-c C-t C-w ,")   'tn-decrease-target-weight)
-(global-set-key (kbd "C-c C-t C-w .")   'tn-increase-target-weight)
+(global-set-key (kbd "C-c C-t C-s 1")   'tn-set-target-sharability-1)
+(global-set-key (kbd "C-c C-t C-s 2")   'tn-set-target-sharability-2)
+(global-set-key (kbd "C-c C-t C-s 3")   'tn-set-target-sharability-3)
+(global-set-key (kbd "C-c C-t C-s 4")   'tn-set-target-sharability-4)
+(global-set-key (kbd "C-c C-t C-s a")   'tn-set-target-sharability-1)
+(global-set-key (kbd "C-c C-t C-s s")   'tn-set-target-sharability-2)
+(global-set-key (kbd "C-c C-t C-s d")   'tn-set-target-sharability-3)
+(global-set-key (kbd "C-c C-t C-s f")   'tn-set-target-sharability-4)
+(global-set-key (kbd "C-c C-t C-w 1")   'tn-set-target-weight-1)
+(global-set-key (kbd "C-c C-t C-w 2")   'tn-set-target-weight-2)
+(global-set-key (kbd "C-c C-t C-w 3")   'tn-set-target-weight-3)
+(global-set-key (kbd "C-c C-t C-w 4")   'tn-set-target-weight-4)
+(global-set-key (kbd "C-c C-t C-w a")   'tn-set-target-weight-1)
+(global-set-key (kbd "C-c C-t C-w s")   'tn-set-target-weight-2)
+(global-set-key (kbd "C-c C-t C-w d")   'tn-set-target-weight-3)
+(global-set-key (kbd "C-c C-t C-w f")   'tn-set-target-weight-4)
 (global-set-key (kbd "C-c C-v b")       'tn-refresh-to-backward-view)
 (global-set-key (kbd "C-c C-v e")       'tn-enter-edit-view)
 (global-set-key (kbd "C-c C-v f")       'tn-refresh-to-forward-view)

;; set weight ;;;;;;;;;;;;;;;;;;;;;;;;;;

(defun set-default-weight (s)
    (if (in-view)
        (if (and (> s 0) (<= s 1))
            (setq tn-default-weight s)
            (error-message
                (concat "weight " (number-to-string s) " is outside of range (0, 1]")))))

(defun tn-decrease-default-weight ()
    (interactive)

    (interactive)
    (set-default-sharability 1.0))

(defun set-min-sharability (s)
    (if (and (in-view) (>= s 0) (<= s 1))
        (request-view t tn-mode tn-root tn-depth tn-style s tn-max-sharability tn-default-sharability tn-min-weight tn-max-weight tn-default-weight)
        (error-message
            (concat "min sharability " (number-to-string s) " is outside of range [0, 1]"))))

(defun tn-decrease-min-sharability ()
    (interactive)
    (set-min-sharability (- tn-min-sharability 0.25)))

(defun tn-increase-min-sharability ()
    (interactive)
    (set-min-sharability (+ tn-min-sharability 0.25)))

(defun tn-set-min-sharability-0 ()
    (interactive)
    (set-min-sharability 0.0))

(defun tn-set-min-sharability-1 ()
    (interactive)
    (set-min-sharability 0.25))

(defun tn-set-min-sharability-2 ()
    (interactive)
    (set-min-sharability 0.5))

(defun tn-set-min-sharability-3 ()
    (interactive)
    (set-min-sharability 0.75))

(defun tn-set-min-sharability-4 ()
    (interactive)
    (set-min-sharability 1.0))

(defun set-max-sharability (s)
    (if (and (in-view) (>= s 0) (<= s 1))
        (request-view t tn-mode tn-root tn-depth tn-style tn-min-sharability s tn-default-sharability tn-min-weight tn-max-weight tn-default-weight)
        (error-message
            (concat "max sharability " (number-to-string s) " is outside of range [0, 1]"))))

(defun tn-decrease-max-sharability ()
    (interactive)
    (set-max-sharability (- tn-max-sharability 0.25)))

(defun tn-increase-max-sharability ()
    (interactive)
    (set-max-sharability (+ tn-max-sharability 0.25)))

(defun tn-set-max-sharability-0 ()
    (interactive)
    (set-max-sharability 0.0))

(defun tn-set-max-sharability-1 ()
    (interactive)
    (set-max-sharability 0.25))

(defun tn-set-max-sharability-2 ()
    (interactive)
    (set-max-sharability 0.5))

(defun tn-set-max-sharability-3 ()
    (interactive)
    (set-max-sharability 0.75))

(defun tn-set-max-sharability-4 ()
    (interactive)
    (set-max-sharability 1.0))


;; UPDATES ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
