- File
+ Action
arrow_drop_down
@@ -127,6 +132,8 @@ class App extends LitElement {
value="120"
size="3"
@input=${this._onBpmInput}
+ @focus=${onInputFocus}
+ @blur=${onInputBlur}
/>
@@ -190,6 +197,7 @@ class App extends LitElement {
const mixer = State.mixer();
this.displayWelcome();
+ KeyHandler.start();
localforage.getItem("theme").then((value) => {
State.setTheme(value);
@@ -237,7 +245,7 @@ class App extends LitElement {
// FIXME currently the keys "roll", as is default OS behaviour
// not sure whether we should deal with it somehow
- keyHandler.registerKey("a", [], () => {
+ KeyHandler.registerKey("a", [], () => {
let modules = this.sequencer.value.getCurrentTrack().patch.modules;
let time = Tone.now();
setFrequency(modules, Tone.Frequency(60, "midi"), time);
@@ -249,17 +257,17 @@ class App extends LitElement {
trackIndex <= this.sequencer.value.numTracks;
trackIndex++
) {
- keyHandler.registerKey(`Digit${trackIndex}`, ["shift"], () => {
+ KeyHandler.registerKey(`Digit${trackIndex}`, ["shift"], () => {
console.debug(`muting channel ${trackIndex - 1}`);
mixer.toggleMute(trackIndex - 1);
});
- keyHandler.registerKey(`Digit${trackIndex}`, ["ctrl"], () => {
+ KeyHandler.registerKey(`Digit${trackIndex}`, ["ctrl"], () => {
console.debug(`soloing channel ${trackIndex - 1}`);
mixer.toggleSolo(trackIndex - 1);
});
- keyHandler.registerKey(`Digit${trackIndex}`, [], () => {
+ KeyHandler.registerKey(`Digit${trackIndex}`, [], () => {
console.debug(`switching to track ${trackIndex - 1}`);
this.sequencer.value.switchTrack(trackIndex - 1);
});
@@ -296,6 +304,7 @@ class App extends LitElement {
constructor() {
super();
this.projectName = SaveManager.projectName;
+ document.title = `${this.projectName} | blipgrid`;
}
}
diff --git a/components/project-settings-dialog.js b/components/project-settings-dialog.js
index 9c76da0..554e6cd 100644
--- a/components/project-settings-dialog.js
+++ b/components/project-settings-dialog.js
@@ -9,6 +9,8 @@ import State from "/state";
import SaveManager from "/save-manager";
import localforage from "localforage";
+import { onInputBlur, onInputFocus } from "../keys";
+
class ProjectSettingsDialog extends LitElement {
dialog = createRef();
@@ -78,6 +80,8 @@ class ProjectSettingsDialog extends LitElement {
type="text"
.value="${this.projectName}"
@input=${this._onNameInput}
+ @focus=${onInputFocus}
+ @blur=${onInputBlur}
/>
@@ -88,6 +92,8 @@ class ProjectSettingsDialog extends LitElement {
type="text"
.value="${this.author}"
@input=${this._onAuthorInput}
+ @focus=${onInputFocus}
+ @blur=${onInputBlur}
/>