aboutsummaryrefslogtreecommitdiffstats
path: root/quantum/keymap_extras/keymap_spanish.h
blob: 19a3c5284bea63a5dfd15b14d47115edf6109a26 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
/* Copyright 2015-2016 Jack Humbert
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
#ifndef KEYMAP_SPANISH_H
#define KEYMAP_SPANISH_H

#include "keymap.h"

// Normal characters
#define ES_OVRR KC_GRV
#define ES_APOS KC_MINS
#define ES_IEXL KC_EQL

#define ES_GRV KC_LBRC
#define ES_PLUS KC_RBRC

#define ES_NTIL KC_SCLN
#define ES_ACUT KC_QUOT
#define ES_CCED KC_NUHS

#define ES_LESS KC_NUBS
#define ES_MINS KC_SLSH

// Shifted characters
#define ES_ASML LSFT(ES_OVRR)
#define ES_QUOT LSFT(KC_2)
#define ES_OVDT LSFT(KC_3)
#define ES_AMPR LSFT(KC_6)
#define ES_SLSH LSFT(KC_7)
#define ES_LPRN LSFT(KC_8)
#define ES_RPRN LSFT(KC_9)
#define ES_EQL LSFT(KC_0)
#define ES_QUES LSFT(ES_APOS)
#define ES_IQUE LSFT(ES_IEXL)

#define ES_CIRC LSFT(ES_GRV)
#define ES_ASTR LSFT(ES_PLUS)

#define ES_UMLT LSFT(ES_GRV)

#define ES_GRTR LSFT(ES_LESS)
#define ES_SCLN LSFT(KC_COMM)
#define ES_COLN LSFT(KC_DOT)
#define ES_UNDS LSFT(ES_MINS)

// Alt Gr-ed characters
#define ES_BSLS ALGR(ES_OVRR)
#define ES_PIPE ALGR(KC_1)
#define ES_AT ALGR(KC_2)
#define ES_HASH ALGR(KC_3)
#define ES_TILD ALGR(ES_NTIL)
#define ES_EURO ALGR(KC_5)
#define ES_NOT ALGR(KC_6)

#define ES_LBRC ALGR(ES_GRV)
#define ES_RBRC ALGR(ES_PLUS)

#define ES_LCBR ALGR(ES_ACUT)
#define ES_RCBR ALGR(ES_CCED)

#endif
---------------------------------------------------| |`HPT_ON` | Turn haptic feedback on | |`HPT_OFF` | Turn haptic feedback off | |`HPT_TOG` | Toggle haptic feedback on/off | |`HPT_RST` | Reset haptic feedback config to default | |`HPT_FBK` | Toggle feedback to occur on keypress, release or both | |`HPT_BUZ` | Toggle solenoid buzz on/off | |`HPT_MODI` | Go to next DRV2605L waveform | |`HPT_MODD` | Go to previous DRV2605L waveform | |`HPT_CONT` | Toggle continuous haptic mode on/off | |`HPT_CONI` | Increase DRV2605L continous haptic strength | |`HPT_COND` | Decrease DRV2605L continous haptic strength | |`HPT_DWLI` | Increase Solenoid dwell time | |`HPT_DWLD` | Decrease Solenoid dwell time | ### Solenoids First you will need a build a circuit to drive the solenoid through a mosfet as most MCU will not be able to provide the current needed to drive the coil in the solenoid. [Wiring diagram provided by Adafruit](https://playground.arduino.cc/uploads/Learning/solenoid_driver.pdf) | Settings | Default | Description | |--------------------------|---------------|-------------------------------------------------------| |`SOLENOID_PIN` | *Not defined* |Configures the pin that the Solenoid is connected to. | |`SOLENOID_DEFAULT_DWELL` | `12` ms |Configures the default dwell time for the solenoid. | |`SOLENOID_MIN_DWELL` | `4` ms |Sets the lower limit for the dwell. | |`SOLENOID_MAX_DWELL` | `100` ms |Sets the upper limit for the dwell. | ?> Dwell time is how long the "plunger" stays activated. The dwell time changes how the solenoid sounds. Beware that some pins may be powered during bootloader (ie. A13 on the STM32F303 chip) and will result in the solenoid kept in the on state through the whole flashing process. This may overheat and damage the solenoid. If you find that the pin the solenoid is connected to is triggering the solenoid during bootloader/DFU, select another pin. ### DRV2605L DRV2605L is controlled over i2c protocol, and has to be connected to the SDA and SCL pins, these varies depending on the MCU in use. #### Feedback motor setup This driver supports 2 different feedback motors. Set the following in your `config.h` based on which motor you have selected. ##### ERM Eccentric Rotating Mass vibration motors (ERM) is motor with a off-set weight attached so when drive signal is attached, the off-set weight spins and causes a sinusoidal wave that translate into vibrations. ``` #define FB_ERM_LRA 0 #define FB_BRAKEFACTOR 3 /* For 1x:0, 2x:1, 3x:2, 4x:3, 6x:4, 8x:5, 16x:6, Disable Braking:7 */ #define FB_LOOPGAIN 1 /* For Low:0, Medium:1, High:2, Very High:3 */ /* Please refer to your datasheet for the optimal setting for your specific motor. */ #define RATED_VOLTAGE 3 #define V_PEAK 5 ``` ##### LRA Linear resonant actuators (LRA, also know as a linear vibrator) works different from a ERM. A LRA has a weight and magnet suspended by springs and a voice coil. When the drive signal is applied, the weight would be vibrate on a single axis (side to side or up and down). Since the weight is attached to a spring, there is a resonance effect at a specific frequency. This frequency is where the LRA will operate the most efficiently. Refer to the motor's datasheet for the recommanded range for this frequency. ``` #define FB_ERM_LRA 1 #define FB_BRAKEFACTOR 3 /* For 1x:0, 2x:1, 3x:2, 4x:3, 6x:4, 8x:5, 16x:6, Disable Braking:7 */ #define FB_LOOPGAIN 1 /* For Low:0, Medium:1, High:2, Very High:3 */ /* Please refer to your datasheet for the optimal setting for your specific motor. */ #define RATED_VOLTAGE 2 #define V_PEAK 2.8 #define V_RMS 2.0 #define V_PEAK 2.1 #define F_LRA 205 /* resonance freq */ ``` #### DRV2605L waveform library DRV2605L comes with preloaded library of various waveform sequences that can be called and played. If writing a macro, these waveforms can be played using `DRV_pulse(*sequence name or number*)` List of waveform sequences from the datasheet: |seq# | Sequence name |seq# | Sequence name |seq# |Sequence name | |-----|---------------------|-----|-----------------------------------|-----|--------------------------------------| | 1 | strong_click | 43 | lg_dblclick_med_60 | 85 | transition_rampup_med_smooth2 | | 2 | strong_click_60 | 44 | lg_dblsharp_tick | 86 | transition_rampup_short_smooth1 | | 3 | strong_click_30 | 45 | lg_dblsharp_tick_80 | 87 | transition_rampup_short_smooth2 | | 4 | sharp_click | 46 | lg_dblsharp_tick_60 | 88 | transition_rampup_long_sharp1 | | 5 | sharp_click_60 | 47 | buzz | 89 | transition_rampup_long_sharp2 | | 6 | sharp_click_30 | 48 | buzz_80 | 90 | transition_rampup_med_sharp1 | | 7 | soft_bump | 49 | buzz_60 | 91 | transition_rampup_med_sharp2 | | 8 | soft_bump_60 | 50 | buzz_40 | 92 | transition_rampup_short_sharp1 | | 9 | soft_bump_30 | 51 | buzz_20 | 93 | transition_rampup_short_sharp2 | | 10 | dbl_click | 52 | pulsing_strong | 94 | transition_rampdown_long_smooth1_50 | | 11 | dbl_click_60 | 53 | pulsing_strong_80 | 95 | transition_rampdown_long_smooth2_50 | | 12 | trp_click | 54 | pulsing_medium | 96 | transition_rampdown_med_smooth1_50 | | 13 | soft_fuzz | 55 | pulsing_medium_80 | 97 | transition_rampdown_med_smooth2_50 | | 14 | strong_buzz | 56 | pulsing_sharp | 98 | transition_rampdown_short_smooth1_50 | | 15 | alert_750ms | 57 | pulsing_sharp_80 | 99 | transition_rampdown_short_smooth2_50 | | 16 | alert_1000ms | 58 | transition_click | 100 | transition_rampdown_long_sharp1_50 | | 17 | strong_click1 | 59 | transition_click_80 | 101 | transition_rampdown_long_sharp2_50 | | 18 | strong_click2_80 | 60 | transition_click_60 | 102 | transition_rampdown_med_sharp1_50 | | 19 | strong_click3_60 | 61 | transition_click_40 | 103 | transition_rampdown_med_sharp2_50 | | 20 | strong_click4_30 | 62 | transition_click_20 | 104 | transition_rampdown_short_sharp1_50 | | 21 | medium_click1 | 63 | transition_click_10 | 105 | transition_rampdown_short_sharp2_50 | | 22 | medium_click2_80 | 64 | transition_hum | 106 | transition_rampup_long_smooth1_50 | | 23 | medium_click3_60 | 65 | transition_hum_80 | 107 | transition_rampup_long_smooth2_50 | | 24 | sharp_tick1 | 66 | transition_hum_60 | 108 | transition_rampup_med_smooth1_50 | | 25 | sharp_tick2_80 | 67 | transition_hum_40 | 109 | transition_rampup_med_smooth2_50 | | 26 | sharp_tick3_60 | 68 | transition_hum_20 | 110 | transition_rampup_short_smooth1_50 | | 27 | sh_dblclick_str | 69 | transition_hum_10 | 111 | transition_rampup_short_smooth2_50 | | 28 | sh_dblclick_str_80 | 70 | transition_rampdown_long_smooth1 | 112 | transition_rampup_long_sharp1_50 | | 29 | sh_dblclick_str_60 | 71 | transition_rampdown_long_smooth2 | 113 | transition_rampup_long_sharp2_50 | | 30 | sh_dblclick_str_30 | 72 | transition_rampdown_med_smooth1 | 114 | transition_rampup_med_sharp1_50 | | 31 | sh_dblclick_med | 73 | transition_rampdown_med_smooth2 | 115 | transition_rampup_med_sharp2_50 | | 32 | sh_dblclick_med_80 | 74 | transition_rampdown_short_smooth1 | 116 | transition_rampup_short_sharp1_50 | | 33 | sh_dblclick_med_60 | 75 | transition_rampdown_short_smooth2 | 117 | transition_rampup_short_sharp2_50 | | 34 | sh_dblsharp_tick | 76 | transition_rampdown_long_sharp1 | 118 | long_buzz_for_programmatic_stopping | | 35 | sh_dblsharp_tick_80 | 77 | transition_rampdown_long_sharp2 | 119 | smooth_hum1_50 | | 36 | sh_dblsharp_tick_60 | 78 | transition_rampdown_med_sharp1 | 120 | smooth_hum2_40 | | 37 | lg_dblclick_str | 79 | transition_rampdown_med_sharp2 | 121 | smooth_hum3_30 | | 38 | lg_dblclick_str_80 | 80 | transition_rampdown_short_sharp1 | 122 | smooth_hum4_20 | | 39 | lg_dblclick_str_60 | 81 | transition_rampdown_short_sharp2 | 123 | smooth_hum5_10 | | 40 | lg_dblclick_str_30 | 82 | transition_rampup_long_smooth1 | | | | 41 | lg_dblclick_med | 83 | transition_rampup_long_smooth2 | | | | 42 | lg_dblclick_med_80 | 84 | transition_rampup_med_smooth1 | | | ### Optional DRV2605L defines ``` #define DRV_GREETING *sequence name or number* ``` If haptic feedback is enabled, the keyboard will vibrate to a specific sqeuence during startup. That can be selected using the following define: ``` #define DRV_MODE_DEFAULT *sequence name or number* ``` This will set what sequence HPT_RST will set as the active mode. If not defined, mode will be set to 1 when HPT_RST is pressed. ### DRV2605L Continuous Haptic Mode This mode sets continuous haptic feedback with the option to increase or decrease strength.