Skip to content

Commit e67f622

Browse files
committed
data.json + disable_keyboard + fullscreen tests
1 parent 344f18e commit e67f622

File tree

14 files changed

+38
-48
lines changed

14 files changed

+38
-48
lines changed

.github/workflows/build.yml

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,9 @@ jobs:
1616
- name: Build project
1717
run: |
1818
npm run build
19-
20-
21-
- name: Move artifact
22-
run: |
23-
mkdir output
24-
mv dist/* output/
2519
2620
- name: Upload artifact
2721
uses: actions/upload-artifact@v4
2822
with:
29-
name: build-output
30-
path: output/
23+
name: package
24+
path: /dist

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
node_modules
22
.vscode
33
out/
4-
dist
4+
dist
5+
extensions_conf/*

PackageCreator.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
const path = require('./lib/path2');
22
const fs = require('fs');
33
const kleur = require('kleur');
4-
const { EXT_CONFIGS_DIR } = require('./lib/Constants');
4+
const { EXT_CONFIGS_DIR, DATA_CONF_PATH } = require('./lib/Constants');
55

66
class PackageCreator
77
{
@@ -20,7 +20,7 @@ class PackageCreator
2020

2121
this.createConfigurations();
2222

23-
try { fs.writeFileSync(path.joinAppData('data.json'), JSON.stringify({...this.conf.default_data, is_configured: false}, null, 2)); }
23+
try { fs.writeFileSync(path.joinAppData(DATA_CONF_PATH), JSON.stringify({...this.conf.default_data, is_configured: false}, null, 2)); }
2424
catch (e) { console.log('Could not create data.json file:', e); }
2525
// this.conf.is_configured = true;
2626
// fs.writeFileSync(PackageCreator.CONF_FILE_PATH, JSON.stringify(this.conf, null, 2));
@@ -40,8 +40,6 @@ class PackageCreator
4040
}
4141
createConfigurations()
4242
{
43-
this.conf_files_dir = this.conf.configuration.conf_files_dir;
44-
Reflect.deleteProperty(this.conf.configuration, 'conf_files_dir');
4543
Object.entries(this.conf.configuration).forEach(([name, conf]) => {
4644
this.loadConfiguration(conf, name);
4745
});

config.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
{
3838
"enabled": true,
3939
"remap_to_pointeraction": true,
40+
"disable_keyboard": true,
4041
"actions":
4142
{
4243
"enlarged_doubleclick":

extensions_conf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/home/leonardo/.config/Webpage_Accessor/extensions_conf/

extensions_conf/double-click.json

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

extensions_conf/electronAPI.json

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

extensions_conf/long-press.json

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

extensions_conf/window-events.json

Lines changed: 0 additions & 1 deletion
This file was deleted.

extensions_main/double-click.js

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -33,15 +33,20 @@ class DoubleClick extends require('../lib/BaseModule')
3333
break ;
3434
}
3535
break ;
36+
case 'gestureTapDown' :
37+
this.looseDoubleClickCheck(input, event);
38+
break ;
3639
}
3740
});
38-
// if (BLOCK_KEYBOARD)
39-
// {
40-
// tab.webContents.on('before-input-event', (event, input) => {
41-
// if (input.type === 'char' || input.type === 'rawKeyDown' || input.type === 'keyUp')
42-
// event.preventDefault();
43-
// });
44-
// }
41+
42+
if (this.__conf.disable_keyboard == true)
43+
{
44+
this.log("disabling keyboard");
45+
this.tab.webContents.on("before-input-event", (event, input) => {
46+
if (input.type === 'keyDown' || input.type === 'keyUp')
47+
event.preventDefault();
48+
});
49+
}
4550
}
4651

4752
async looseDoubleClickCheck(input, event)

0 commit comments

Comments
 (0)