Finished mouse compatability

This commit is contained in:
Mikayla Maki 2022-08-19 13:54:25 -07:00
parent 9f9bafd2a7
commit cfbda00cc4
5 changed files with 77 additions and 30 deletions

View file

@ -134,8 +134,8 @@ pub fn scroll_report(
pub fn alt_scroll(scroll_lines: i32) -> Vec<u8> {
let cmd = if scroll_lines > 0 { b'A' } else { b'B' };
let mut content = Vec::with_capacity(scroll_lines as usize * 3);
for _ in 0..scroll_lines {
let mut content = Vec::with_capacity(scroll_lines.abs() as usize * 3);
for _ in 0..scroll_lines.abs() {
content.push(0x1b);
content.push(b'O');
content.push(cmd);