Compare commits

..

No commits in common. "1ddbfc7b5c115477fc1621987654b33bf712598d" and "112ee7b90a9fefb78660ec1f1bec1082033f807f" have entirely different histories.

2 changed files with 6 additions and 7 deletions

View file

@ -297,12 +297,12 @@
(press-key-aux keycode key))) (press-key-aux keycode key)))
;; Record that a given key being released resulted in a modifier release. ;; Record that a given key being released resulted in a modifier release.
(define (release-modifier modifier key n) (define (release-modifier keycode key n)
(if (= (or (vector-ref keys-for-modifiers n) (- 0 1)) key) (if (= (or (vector-ref keys-for-modifiers n) (- 0 1)) key)
(begin (begin
(set! modifiers (^ modifiers modifier)) (set! modifiers (^ modifiers (unmodify keycode)))
(vector-set! keys-for-modifiers n #f)) (vector-set! keys-for-modifiers n #f))
(and (< n 7) (release-modifier modifier key (+ n 1))))) (and (< n 7) (release-modifier keycode key (+ n 1)))))
;; Record a key release, clearing it out of the press tracking data. ;; Record a key release, clearing it out of the press tracking data.
(define (release-key key) (define (release-key key)
@ -320,7 +320,9 @@
(vector-set! keys-for-frame slot #f)) (vector-set! keys-for-frame slot #f))
#f) #f)
(if modifier-slot (if modifier-slot
(release-modifier (call-c-func "mathpow" 2 modifier-slot) key 0) (begin
(release-modifier keycode key 0)
(release-key key))
#f))))) #f)))))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Send USB ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Send USB

View file

@ -33,9 +33,6 @@
int16_t mathlog2(int x) { int16_t mathlog2(int x) {
return round(log(x)/log(2)); return round(log(x)/log(2));
} }
int16_t mathpow(int x, int y) {
return round(pow(x, y));
}
/************************************************************************** /**************************************************************************
* *