Skip to content

Commit 0089d3b

Browse files
authored
Merge pull request #18 from rust-embedded-community/pause-break-support
Pause/break support
2 parents 7bd7bce + 950a372 commit 0089d3b

File tree

13 files changed

+336
-158
lines changed

13 files changed

+336
-158
lines changed

.github/workflows/build.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: Build
2+
3+
on: [push, pull_request]
4+
5+
env:
6+
CARGO_TERM_COLOR: always
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout Code
13+
uses: actions/checkout@v3
14+
with:
15+
submodules: true
16+
17+
- name: Install Rust
18+
uses: actions-rs/toolchain@v1
19+
with:
20+
profile: minimal
21+
toolchain: stable
22+
override: true
23+
24+
- name: Build Code
25+
run: cargo build --verbose
26+
27+
- name: Test Code
28+
run: cargo test --verbose
29+
30+
- name: Get Branch Name
31+
if: github.event_name == 'push' && startswith(github.ref, 'refs/tags/')
32+
id: branch_name
33+
run: |
34+
echo ::set-output name=SOURCE_TAG::${GITHUB_REF#refs/tags/}
35+
36+
- name: Create Release
37+
if: github.event_name == 'push' && startswith(github.ref, 'refs/tags/')
38+
id: create_release
39+
uses: actions/create-release@v1
40+
env:
41+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
42+
with:
43+
tag_name: ${{ github.ref }}
44+
release_name: Release ${{ steps.branch_name.outputs.SOURCE_TAG }}
45+
draft: false
46+
prerelease: false

.github/workflows/clippy.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Clippy
2+
3+
on: [push, pull_request]
4+
5+
env:
6+
CARGO_TERM_COLOR: always
7+
8+
jobs:
9+
clippy-check:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout Code
13+
uses: actions/checkout@v3
14+
15+
- name: Install Rust
16+
uses: actions-rs/toolchain@v1
17+
with:
18+
toolchain: stable
19+
components: clippy
20+
21+
- name: Run Clippy
22+
uses: actions-rs/clippy-check@v1
23+
with:
24+
token: ${{ secrets.GITHUB_TOKEN }}
25+
args: --all-features

.github/workflows/format.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: Format
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
format-check:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- name: Checkout Code
10+
uses: actions/checkout@v3
11+
12+
- name: Install Rust
13+
uses: actions-rs/toolchain@v1
14+
with:
15+
toolchain: stable
16+
components: rustfmt
17+
18+
- name: Check Format
19+
run: cargo fmt -- --check

.travis.yml

Lines changed: 0 additions & 11 deletions
This file was deleted.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ fn main() {
4040

4141
## Minimum Supported Rust Version (MSRV)
4242

43-
This crate is guaranteed to compile on stable Rust 1.31 and up. It might compile with older versions but that may change in any new patch release.
43+
This crate is guaranteed to compile on stable Rust 1.40 and up. It might compile with older versions but that may change in any new patch release.
4444

4545
## License
4646

src/layouts/azerty.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -501,10 +501,8 @@ impl KeyboardLayout for Azerty {
501501
}
502502
}
503503
KeyCode::NumpadEnter => DecodedKey::Unicode(10.into()),
504-
KeyCode::ShiftLeft => {
505-
DecodedKey::Unicode('<')
506-
}
504+
KeyCode::ShiftLeft => DecodedKey::Unicode('<'),
507505
k => DecodedKey::RawKey(k),
508506
}
509507
}
510-
}
508+
}

src/layouts/colemak.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -480,4 +480,4 @@ impl KeyboardLayout for Colemak {
480480
k => DecodedKey::RawKey(k),
481481
}
482482
}
483-
}
483+
}

src/layouts/de104.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ impl KeyboardLayout for De104Key {
214214
DecodedKey::Unicode('<')
215215
}
216216
}
217-
217+
218218
e => <super::Us104Key as KeyboardLayout>::map_keycode(e, modifiers, handle_ctrl),
219219
}
220220
}

src/layouts/jis109.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
/// A standard Japan 106-key (or 109-key including Windows keys) keyboard.
22
/// Has a 2-row high Enter key, with Backslash above.
3-
43
use crate::{DecodedKey, HandleControl, KeyCode, KeyboardLayout, Modifiers};
54

65
pub use super::us104::Us104Key;

src/layouts/uk105.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,4 +63,4 @@ impl KeyboardLayout for Uk105Key {
6363
e => <super::Us104Key as KeyboardLayout>::map_keycode(e, modifiers, handle_ctrl),
6464
}
6565
}
66-
}
66+
}

src/layouts/us104.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -480,4 +480,4 @@ impl KeyboardLayout for Us104Key {
480480
k => DecodedKey::RawKey(k),
481481
}
482482
}
483-
}
483+
}

0 commit comments

Comments
 (0)