Compare commits
No commits in common. "1ddbfc7b5c115477fc1621987654b33bf712598d" and "112ee7b90a9fefb78660ec1f1bec1082033f807f" have entirely different histories.
1ddbfc7b5c
...
112ee7b90a
2 changed files with 6 additions and 7 deletions
10
menelaus.scm
10
menelaus.scm
|
@ -297,12 +297,12 @@
|
|||
(press-key-aux keycode key)))
|
||||
|
||||
;; 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)
|
||||
(begin
|
||||
(set! modifiers (^ modifiers modifier))
|
||||
(set! modifiers (^ modifiers (unmodify keycode)))
|
||||
(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.
|
||||
(define (release-key key)
|
||||
|
@ -320,7 +320,9 @@
|
|||
(vector-set! keys-for-frame slot #f))
|
||||
#f)
|
||||
(if modifier-slot
|
||||
(release-modifier (call-c-func "mathpow" 2 modifier-slot) key 0)
|
||||
(begin
|
||||
(release-modifier keycode key 0)
|
||||
(release-key key))
|
||||
#f)))))
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Send USB
|
||||
|
|
|
@ -33,9 +33,6 @@
|
|||
int16_t mathlog2(int x) {
|
||||
return round(log(x)/log(2));
|
||||
}
|
||||
int16_t mathpow(int x, int y) {
|
||||
return round(pow(x, y));
|
||||
}
|
||||
|
||||
/**************************************************************************
|
||||
*
|
||||
|
|
Loading…
Reference in a new issue