Skip to content

Commit

Permalink
Убрал приведение всех нажатых клавиш к маленьким буквам
Browse files Browse the repository at this point in the history
  • Loading branch information
anfilat committed Jul 28, 2020
1 parent a799fde commit c2b02b2
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion rollup.config.js
Expand Up @@ -9,7 +9,7 @@ const production = !process.env.ROLLUP_WATCH;
export default {
input: 'src/main.js',
output: {
sourcemap: false,
sourcemap: !production,
format: 'iife',
name: 'app',
file: 'public/bundle.js'
Expand Down
2 changes: 1 addition & 1 deletion src/App.svelte
Expand Up @@ -35,7 +35,7 @@
function onKey(event) {
const key = event.detail;
if (key === 'backspace') {
if (key.toLowerCase() === 'backspace') {
lastKeys = lastKeys.slice(0, -1);
} else if (key.length === 1) {
lastKeys += key;
Expand Down
2 changes: 1 addition & 1 deletion src/components/KeyPress.svelte
Expand Up @@ -4,7 +4,7 @@
const dispatch = createEventDispatcher();
function onKeyDown(event) {
dispatch('key', event.key.toLowerCase());
dispatch('key', event.key);
}
</script>

Expand Down
2 changes: 1 addition & 1 deletion src/trainings/selectKeys/Setup.svelte
Expand Up @@ -3,7 +3,7 @@
import {selectKeys} from './store';
function onKey(event) {
const key = event.detail;
const key = event.detail.toLowerCase();
if (key === 'backspace') {
selectKeys.removeLastKey();
Expand Down

0 comments on commit c2b02b2

Please sign in to comment.