当前位置: 首页>>代码示例>>C++>>正文


C++ MO函数代码示例

本文整理汇总了C++中MO函数的典型用法代码示例。如果您正苦于以下问题:C++ MO函数的具体用法?C++ MO怎么用?C++ MO使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了MO函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: MO

int OCCFace::offset(double offset, double tolerance = 1e-6) {
    try {
        BRepOffset_MakeOffset MO(this->getShape(), offset, tolerance, BRepOffset_Skin,
                                 Standard_False, Standard_False, GeomAbs_Intersection, Standard_False);
        
        if (!MO.IsDone()) {
            StdFail_NotDone::Raise("Failed to offset face");
        }
        
        const TopoDS_Shape& tmp = MO.Shape();
        BRepCheck_Analyzer aChecker(tmp);
        
        if (tmp.IsNull() || !aChecker.IsValid()) {
            StdFail_NotDone::Raise("offset result not valid");
        }
        
        this->setShape(tmp);
        
        // possible fix shape
        if (!this->fixShape())
            StdFail_NotDone::Raise("Shapes not valid");
        
    } catch(Standard_Failure &err) {
        Handle_Standard_Failure e = Standard_Failure::Caught();
        const Standard_CString msg = e->GetMessageString();
        if (msg != NULL && strlen(msg) > 1) {
            setErrorMessage(msg);
        } else {
            setErrorMessage("Failed to offset face");
        }
        return 0;
    }
    return 1;
}
开发者ID:Felipeasg,项目名称:occmodel,代码行数:34,代码来源:OCCFace.cpp

示例2: get_size

long get_size()
{
    //si taille prédéfinie
    if(I->check1->value())
        return taille[I->combo_taille->value()].n;
    else
        //si non prédéfinie
    {
        const char *s = I->taille->value();
        int i = I->combo_mesure->value();

        while(*s) {
            if(i==2 && *s=='.') {
                fn_alert("Attention, pas de virgule dans les octets...");
                return 0;
            }
            if(!isdigit(*s) && *s!='.') {
                fn_alert("Le chiffre \"%s\" est incorrecte...\n",I->taille->value());
                return 0;
            }
            s++;
        }

        //maintenant retourne la bonne valeur
        switch(i) {
        case 0: //MO
            return (long)MO(atof(I->taille->value()));
        case 1: //KO
            return (long)KO(atof(I->taille->value()));
        case 2: //Octet
            return (long)atof(I->taille->value());
        }
    }
    return 0;
}
开发者ID:Asher256,项目名称:ultrasplitter,代码行数:35,代码来源:usplit.cpp

示例3: process_record_user

bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {
  case MO(_LOWER):
    if (game){
      if(record->event.pressed) {
        register_code(KC_SPC);
      } else {
        unregister_code(KC_SPC);
      }
      return false;
    } else {
      return true;
    }
  case MU_ON:
    if(record->event.pressed) {
      layer_off(_LOWER);
      layer_off(_RAISE);
      layer_off(_NAV);
      layer_off(_DEADKEY);
      layer_on(_MUSICMODE);
    }
    return true;
  case MU_OFF:
    if(record->event.pressed) {
      layer_off(_MUSICMODE);
    }
    return true;
  }
  return process_record_userspace(keycode, record);
}
开发者ID:bellwood4486,项目名称:qmk_firmware,代码行数:30,代码来源:keymap.c

示例4: Handle

int OCCWire::offset(double distance, int joinType = 0) {
    Handle(TopTools_HSequenceOfShape) wires = new TopTools_HSequenceOfShape;
    Handle(TopTools_HSequenceOfShape) edges = new TopTools_HSequenceOfShape;
    TopExp_Explorer ex;
    
    try {
        GeomAbs_JoinType join = GeomAbs_Arc;
        switch (joinType) {
            case 1:
                join = GeomAbs_Tangent;
                break;
            case 2:
                join = GeomAbs_Intersection;
                break;
        }   
        BRepOffsetAPI_MakeOffset MO(this->getWire(), join);
        MO.Perform(distance);
        
        for (ex.Init(MO.Shape(), TopAbs_EDGE); ex.More(); ex.Next()) {
            if (!ex.Current().IsNull()) {
                edges->Append(TopoDS::Edge(ex.Current()));
            }
        }
        ShapeAnalysis_FreeBounds::ConnectEdgesToWires(edges,Precision::Confusion(),Standard_True,wires);
        if (wires->Length() != 1)
            StdFail_NotDone::Raise("offset operation created empty result");
        
        this->setShape(wires->Value(1));
        
        // possible fix shape
        if (!this->fixShape())
            StdFail_NotDone::Raise("Shapes not valid");
        
    } catch(Standard_Failure &err) {
        Handle_Standard_Failure e = Standard_Failure::Caught();
        const Standard_CString msg = e->GetMessageString();
        if (msg != NULL && strlen(msg) > 1) {
            setErrorMessage(msg);
        } else {
            setErrorMessage("Failed to offset wire");
        }
        return 0;
    }
    return 1;
}
开发者ID:Felipeasg,项目名称:occmodel,代码行数:45,代码来源:OCCWire.cpp

示例5: LAYOUT

* | Esc |  1  |  2  |  3  |  4  |  5  |  6  |  7  |  8  |  9  |  0  |  ß  |  ´  |   BSPC    |
* |-----------------------------------------------------------------------------------------+
* | Tab    |  Q  |  W  |  E  |  R  |  T  |  Z  |  U  |  I  |  O  |  P  |  P  |  Ü  | *  |   |
* |-------------------------------------------------------------------------------------|   +
* | Layer_1    |  A  |  S  |  D  |  F  |  G  |  H  |  J  |  K  |  L  |  Ö  |  Ä |  # |Enter |
* |-----------------------------------------------------------------------------------------+
* | Shift|  < |  Y  |  X  |  C  |  V  |  B  |  N  |  M  |  ,  |  .  |  .  |  -  |  RShift   |
* |-----------------------------------------------------------------------------------------+
* | LCtrl |  LGUI  |  LAlt  |               Space                | RAlt  | Layer_2 |  RCtrl |
* `-----------------------------------------------------------------------------------------'
*/

	LAYOUT(
		KC_ESC,   KC_1,       KC_2,     KC_3,     KC_4,     KC_5,     KC_6,     KC_7, 	KC_8, 		KC_9,		KC_0, 		KC_MINS, KC_EQL, 	KC_NO, 	KC_BSPC,
		KC_TAB,   KC_Q,       KC_W,     KC_E,     KC_R,     KC_T,     KC_Y,     KC_U, 	KC_I, 		KC_O,		KC_P, 		KC_LBRC, KC_RBRC, 	KC_BSLS,
		MO(1),    KC_A,       KC_S,     KC_D,     KC_F,     KC_G,     KC_H,     KC_J, 	KC_K, 		KC_L, 		KC_SCLN, 	KC_QUOT, KC_ENT,
		KC_LSFT,  KC_NUBS,    KC_Z,     KC_X,     KC_C,     KC_V,     KC_B,     KC_N, 	KC_M, 		KC_COMM, 	KC_DOT, 	KC_SLSH, KC_RSFT,
    	KC_LCTL,  KC_LCTL,    KC_LGUI,  KC_LALT,  KC_SPC,   KC_SPC,   KC_SPC,   KC_NO,	KC_RALT, 	KC_NO, 		MO(2), 		KC_RCTL),


	LAYOUT(
		KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NO, KC_DEL,
		KC_NO, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
		KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
		KC_PGUP, KC_NO, KC_NO, KC_NO, BL_DEC, BL_TOGG, BL_INC, BL_STEP, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
		KC_PGDOWN, KC_LGUI, KC_LGUI, KC_NO, KC_NO, KC_NO, KC_RALT, KC_RGUI, KC_NO, KC_NO, KC_RCTL),

	LAYOUT(
		KC_GRV,  KC_MPRV,   KC_MPLY,  KC_MNXT, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_DEL,
		KC_NO, KC_NO, KC_UP, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
		KC_NO, KC_LEFT, KC_DOWN, KC_RIGHT, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
开发者ID:20lives,项目名称:qmk_firmware,代码行数:31,代码来源:keymap.c

示例6: KEYMAP_V2

     *,-----------------------------------------------------------------------.
     * |Esc| F1| F2| F3| F4| F5| F6|    F7| F8| F9| F10| F11| F12|Prnt|Ins|Del| 
	 * |----------------------------------------------------------------------|
     * |  `|  1|  2|  3|  4|  5|  6|    7|  8|  9|  0|  -|  =| Backspace| Home|
     * |----------------------------------------------------------------------|
     * |Tab  |  Q|  W|  E|  R|  T|      Y|  U|  I|  O|  P|  [|  ]|  \|    PgUp|
     * |----------------------------------------------------------------------|
     * |Ctrl|  A|  S|  D|  F|  G|       H|  J|  K|  L|  ;|  '|Enter  |  PgDown|
     * |----------------------------------------------------------------------|
     * |Shif|   |  Z|  X|  C|  V|  B|   N|  M|  ,|  .|  /|Shift |      Up| End|
     * |----------------------------------------------------------------------|
     * |CapsLo|Gui |Alt |Mod|Sp |      Sp| Alt| Gui| Ctrl|    | Lef| Dow| Rig|
     * `----------------------------------------------------------------------'
     */
	KEYMAP_V2(
		KC_ESC,  KC_F1,   KC_F2,   KC_F3,  KC_F4, KC_F5,  KC_F6,            KC_F7,   KC_F8,   KC_F9,   KC_F10,  KC_F11,  KC_F12,  KC_PSCR,  KC_INS,  KC_DEL, 
		KC_GRV,  KC_1,    KC_2,    KC_3,   KC_4,  KC_5,   KC_6,             KC_7,    KC_8,    KC_9,    KC_0,    KC_MINS, KC_EQL,  KC_BSPC,  KC_TRNS, KC_HOME, // KC_TRNS is the unneeded key in the split backspace.
		KC_TAB,  KC_Q,    KC_W,    KC_E,   KC_R,  KC_T,                     KC_Y,    KC_U,    KC_I,    KC_O,    KC_P,    KC_LBRC, KC_RBRC,  KC_BSLS, KC_PGUP, 
		KC_LCTL, KC_A,    KC_S,    KC_D,   KC_F,  KC_G,                     KC_H,    KC_J,    KC_K,    KC_L,    KC_SCLN, KC_QUOT, KC_TRNS,  KC_ENT,  KC_PGDN, // KC_TRNS is uneeded ISO enter key. 
		KC_LSFT, KC_TRNS, KC_Z,    KC_X,   KC_C,  KC_V,   KC_B,             KC_B,    KC_N,    KC_M,    KC_COMM, KC_DOT,  KC_SLSH, KC_RSFT,  KC_UP,   KC_END,  // KC_TRNS is uneeded ISO layout key.
		KC_CAPS, KC_LGUI, KC_LALT,         MO(1), KC_SPC,                   KC_SPC,  KC_RALT, KC_RGUI, KC_RCTL,                   KC_LEFT,  KC_DOWN, KC_RGHT),

	KEYMAP_V2(
		RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, KC_TRNS, KC_TRNS, KC_TRNS,      KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET, 
		RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD, KC_TRNS, KC_TRNS, KC_TRNS,      KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 
		KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,               KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 
		KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,               KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLU, 
		KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,      KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPLY, KC_VOLD, 
		KC_TRNS, KC_TRNS, KC_TRNS,          KC_TRNS, KC_TRNS,               KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,                   KC_MPRV, KC_STOP, KC_MNXT),

};
开发者ID:0tsuki,项目名称:qmk_firmware,代码行数:31,代码来源:keymap.c

示例7: LAYOUT

#ifdef RGBLIGHT_ENABLE
//Following line allows macro to read current RGB settings
extern rgblight_config_t rgblight_config;
#endif

enum custom_keycodes {
  RGBRST = SAFE_RANGE
};


const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
  [0] = LAYOUT( \
    KC_GRV,  KC_1,    KC_2,    KC_3,    KC_4,    KC_5,      KC_6,    KC_7,    KC_8,    KC_9,    KC_0,    KC_MINS, KC_EQL,    KC_BSPC,  \
    KC_TAB,    KC_Q,    KC_W,    KC_E,    KC_R,    KC_T,      KC_Y,    KC_U,    KC_I,    KC_O,    KC_P,    KC_LBRC, KC_RBRC, KC_BSLS,  \
    KC_CAPS,     KC_A,    KC_S,    KC_D,    KC_F,    KC_G,      KC_H,    KC_J,    KC_K,    KC_L,    KC_SCLN, KC_QUOT,        KC_ENT,   \
    KC_LSFT,       KC_Z,    KC_X,    KC_C,    KC_V,    KC_B,      KC_N,    KC_M,    KC_COMM, KC_DOT,  KC_SLSH, KC_RSFT,   KC_UP,  MO(1),   \
    KC_ESC,    KC_LCTL,    KC_LGUI,    KC_LALT,    KC_SPC,        KC_BSPC, KC_ENT,  LALT(KC_GRV),               KC_LEFT,KC_DOWN,KC_RGHT \
  ),
  [1] = LAYOUT( \
    KC_ESC,  KC_F1,   KC_F2,   KC_F3,   KC_F4,   KC_F5,     KC_F6,   KC_F7,   KC_F8,   KC_F9,   KC_F10,  KC_F11,  KC_F12,    KC_DEL, \
    RGB_TOG,   RGBRST,  RGB_HUI, RGB_SAI, RGB_VAI, XXXXXXX,   XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \
    XXXXXXX,     RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD, XXXXXXX,   XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,        XXXXXXX, \
    _______,       XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,   XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, KC_PGUP, _______, \
    XXXXXXX,   _______,    _______,    _______,    XXXXXXX,       XXXXXXX, XXXXXXX, XXXXXXX,                   KC_HOME, KC_PGDN, KC_END \
  )
};

// define variables for reactive RGB
bool TOG_STATUS = false;
int RGB_current_mode;
开发者ID:Talljoe,项目名称:qmk_firmware,代码行数:30,代码来源:keymap.c

示例8: LAYOUT_seventy_iso

#include QMK_KEYBOARD_H

// Define layer names
#define _NORMAL 0
#define _FNONE 1
#define _FNTWO 2

// Highly Modified by Xydane
const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
  [_NORMAL] = LAYOUT_seventy_iso(
  KC_ESC, KC_F1,  KC_F2,  KC_F3,  KC_F4,  KC_F5,  KC_F6,  KC_F7,  KC_F8,  KC_F9,  KC_F10, KC_F11,  KC_F12, KC_PSCREEN,KC_HOME, KC_END, \
KC_GRAVE, KC_1,   KC_2,   KC_3,   KC_4,   KC_5,   KC_6,   KC_7,   KC_8,   KC_9,   KC_0,   KC_MINS, KC_EQL,  KC_BSPC, KC_DELETE, \
  KC_TAB, KC_Q,   KC_W,   KC_E,   KC_R,   KC_T,   KC_Y,   KC_U,   KC_I,   KC_O,   KC_P,   KC_LBRC, KC_RBRC,          KC_PGUP, \
 KC_CAPS, KC_A,   KC_S,   KC_D,   KC_F,   KC_G,   KC_H,   KC_J,   KC_K,   KC_L,   KC_SCLN,KC_QUOT, KC_NUHS,   KC_ENT,KC_PGDOWN, \
 KC_LSPO, KC_NUBS,KC_Z,   KC_X,   KC_C,   KC_V,   KC_B,   KC_N,   KC_M,   KC_COMM,KC_DOT, KC_SLSH, KC_RSPC,KC_UP,  TT(2), \
 KC_LCTL, KC_LGUI,KC_LALT,                        KC_SPC,                 KC_RALT,MO(1),   KC_RCTL, KC_LEFT, KC_DOWN, KC_RIGHT ),
        
  [_FNONE] = LAYOUT_seventy_iso(
  KC_TRNS, KC_MPRV, KC_MSTP, KC_MPLY, KC_MNXT, KC_TRNS,KC_MUTE,KC_VOLD,KC_VOLU, KC_TRNS,KC_TRNS,KC_NLCK, KC_CALC, KC_TRNS,KC_TRNS,KC_TRNS, \
  KC_TRNS,  KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_P7,  KC_P8,  KC_P9,  KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS, \
  KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_P4,   KC_P5,  KC_P6,  KC_PPLS, KC_TRNS, KC_TRNS,         KC_TRNS, \
  KC_TRNS,  KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_P1,  KC_P2,  KC_P3,  KC_PAST, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS, \
  KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_P0,  KC_PDOT,KC_PENT, KC_PSLS,   KC_TRNS,KC_TRNS,KC_TRNS, \
  KC_TRNS, KC_TRNS, KC_TRNS,                  KC_TRNS,                        KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS ),

  [_FNTWO] = LAYOUT_seventy_iso(
  KC_TRNS, KC_MPRV, KC_MSTP, KC_MPLY, KC_MNXT, KC_TRNS,KC_MUTE,KC_VOLD,KC_VOLU, KC_TRNS,KC_TRNS,KC_NLCK, KC_CALC, KC_TRNS,KC_TRNS,KC_TRNS, \
  KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_P7,  KC_P8,  KC_P9,  KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS, \
  KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_P4,  KC_P5,  KC_P6,  KC_PPLS, KC_TRNS, KC_TRNS,         KC_TRNS, \
  KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_P1,  KC_P2,  KC_P3,  KC_PAST, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS, \
  KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_P0,  KC_PDOT,KC_PENT, KC_PSLS,  KC_TRNS,KC_TRNS,KC_TRNS, \
开发者ID:0xdec,项目名称:qmk_firmware,代码行数:31,代码来源:keymap.c

示例9: LAYOUT_60_ansi

#include QMK_KEYBOARD_H

const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {

    [0] = LAYOUT_60_ansi(
        KC_ESC,  KC_1,    KC_2,    KC_3,  KC_4,  KC_5,  KC_6,  KC_7,  KC_8,    KC_9,    KC_0,    KC_MINS, KC_EQL,  KC_BSPC,
        KC_TAB,  KC_Q,    KC_W,    KC_E,  KC_R,  KC_T,  KC_Y,  KC_U,  KC_I,    KC_O,    KC_P,    KC_LBRC, KC_RBRC, KC_BSLS,
        KC_CAPS, KC_A,    KC_S,    KC_D,  KC_F,  KC_G,  KC_H,  KC_J,  KC_K,    KC_L,    KC_SCLN, KC_QUOT, KC_ENT,
        KC_LSFT, KC_Z,    KC_X,    KC_C,  KC_V,  KC_B,  KC_N,  KC_M,  KC_COMM, KC_DOT,  KC_SLSH, KC_LSFT,
        KC_LCTL, KC_LGUI, KC_LALT,               KC_SPC,                       KC_LALT, MO(1),   KC_MENU, KC_LCTL
    ),

    [1] = LAYOUT_60_ansi(
        RESET,   KC_F1,   KC_F2,   KC_F3,   KC_F4,   KC_F5,   KC_F6,   KC_F7,   KC_F8,   KC_F9,   KC_F10,  KC_F11,  KC_F12,  KC_DEL,
        _______, RGB_TOG, KC_UP,   RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, _______,
        _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, _______, _______, _______, _______, _______,
        _______, _______, _______, BL_DEC,  BL_TOGG, BL_INC,  _______, _______, _______, _______, _______, _______,
        _______, _______, _______,                   _______,                            _______, _______, _______, _______
    ),
};
开发者ID:Talljoe,项目名称:qmk_firmware,代码行数:20,代码来源:keymap.c

示例10: LAYOUT_all

#include QMK_KEYBOARD_H

const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {

    /* QWERTY */
	LAYOUT_all(
		KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_GRV, KC_BSLS,
		KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC,
		MO(3), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT,
		KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_LSFT, MO(3),
		KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, KC_RALT, KC_LCTL), 

    /* DVORAK */
	LAYOUT_all(
		KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_LBRC, KC_RBRC, KC_GRV, KC_BSLS, 
		KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH, KC_EQL, KC_BSPC,  
		MO(3), KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, KC_ENT,
		KC_LSFT, KC_NUBS, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_LSFT, MO(3),
		KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, KC_RALT, KC_RCTL), 

    /* COLEMAK */
	LAYOUT_all(
		KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_GRV, KC_BSLS,
		KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_LBRC, KC_RBRC, KC_BSPC,
		MO(3), KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, KC_ENT, 
		KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_LSFT, MO(3),
		KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, KC_RALT, KC_RCTL), 

    /* FUNCTION */
	LAYOUT_all(
		KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_TRNS, KC_TRNS,
开发者ID:0xdec,项目名称:qmk_firmware,代码行数:31,代码来源:keymap.c

示例11: LAYOUT_grid

 * (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/>.
 */
#include "cu24.h"

const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT_grid( /* Base */
  KC_MPLY,  KC_MUTE,  KC_VOLD,  KC_VOLU, \
  MO(1)  ,  KC_PSLS,  KC_PAST,  KC_PMNS, \
  KC_P7  ,  KC_P8  ,  KC_P9  ,  KC_PPLS, \
  KC_P4  ,  KC_P5  ,  KC_P6  ,  KC_PPLS, \
  KC_P1  ,  KC_P2  ,  KC_P3  ,  KC_PENT, \
  KC_P0  ,  KC_P0  ,  KC_PDOT,  KC_PENT
),

[1] = LAYOUT_grid( /* FN */
  RGB_TOG,  RGB_MOD,  BL_STEP,  BL_BRTG, \
  KC_TRNS,  KC_TRNS,  KC_TRNS,  KC_TRNS, \
  RGB_HUI,  RGB_SAI,  RGB_VAI,  KC_TRNS, \
  RGB_HUD,  RGB_SAD,  RGB_VAD,  KC_TRNS, \
  KC_TRNS,  KC_TRNS,  KC_TRNS,  KC_TRNS, \
  KC_TRNS,  KC_TRNS,  RESET  ,  KC_TRNS
),
};
开发者ID:0xdec,项目名称:qmk_firmware,代码行数:31,代码来源:keymap.c

示例12: LAYOUT_60_hhkb

// M60-A layout
#include QMK_KEYBOARD_H

const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {

// Vim layer (Default)
[0] = LAYOUT_60_hhkb(
  KC_GRV,              KC_1,    KC_2,    KC_3, KC_4, KC_5, KC_6,          KC_7, KC_8,    KC_9,   KC_0,    KC_MINS, KC_EQL,  KC_BSLS, KC_ESC,
  KC_TAB,               KC_Q,    KC_W,    KC_E, KC_R, KC_T, KC_Y,          KC_U, KC_I,    KC_O,   KC_P,    KC_LBRC, KC_RBRC, KC_BSPC,
  MT(MOD_LCTL, KC_ESC), KC_A,    KC_S,    KC_D, KC_F, KC_G, KC_H,          KC_J, KC_K,    KC_L,   KC_SCLN, KC_QUOT, KC_ENT,
  KC_LSFT,              KC_Z,    KC_X,    KC_C, KC_V, KC_B, KC_N,          KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(1),
                        KC_LALT, KC_LGUI,                   LT(1, KC_SPC),                DF(2),  MO(1)),

// Extra Function Layer
[1] = LAYOUT_60_hhkb(
  XXXXXXX, KC_F1,   KC_F2,   KC_F3,   KC_F4,   KC_F5,   KC_F6,   KC_F7,   KC_F8,   KC_F9,   KC_F10,  KC_F11,  KC_F12,  KC_MNXT, KC_MPLY,
  KC_CAPS, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_PSCR, XXXXXXX, XXXXXXX, XXXXXXX,
  KC_LCTL, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_UP,   KC_RGHT, KC_LEFT, KC_RGHT, XXXXXXX,
  XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_VOLD, KC_VOLU, KC_MUTE, XXXXXXX, XXXXXXX,
           XXXXXXX, XXXXXXX,                            XXXXXXX,                            XXXXXXX, MO(3)),

// Gamer Layer
[2] = LAYOUT_60_hhkb(
  KC_GRV,  KC_1,    KC_2,    KC_3, KC_4, KC_5, KC_6,   KC_7, KC_8,    KC_9,   KC_0,    KC_MINS, KC_EQL,  KC_BSLS, KC_ESC,
  KC_TAB,  KC_Q,    KC_W,    KC_E, KC_R, KC_T, KC_Y,   KC_U, KC_I,    KC_O,   KC_P,    KC_LBRC, KC_RBRC, KC_BSPC,
  KC_LCTL, KC_A,    KC_S,    KC_D, KC_F, KC_G, KC_H,   KC_J, KC_K,    KC_L,   KC_SCLN, KC_QUOT, KC_ENT,
  KC_LSFT, KC_Z,    KC_X,    KC_C, KC_V, KC_B, KC_N,   KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(1),
           KC_LALT, KC_LGUI,                   KC_SPC,                        DF(0),   MO(1)),

// Board config Layer (zeal60 Configuration)
[3] = LAYOUT_60_hhkb(
开发者ID:lukelex,项目名称:dotfiles,代码行数:31,代码来源:keymap.c

示例13: LAYOUT_all

#include QMK_KEYBOARD_H
#include "action_layer.h"

const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {

  // 0: Base Layer
  [0] = LAYOUT_all(
      KC_ESC,  KC_1,    KC_2,    KC_3,    KC_4,   KC_5,   KC_6,   KC_7,   KC_8,   KC_9,    KC_0,    KC_MINS,  KC_EQL,  KC_NO,    KC_BSPC,   \
      KC_TAB,  KC_Q,    KC_W,    KC_E,    KC_R,   KC_T,   KC_Y,   KC_U,   KC_I,   KC_O,    KC_P,    KC_LBRC,  KC_RBRC,           KC_BSLS,   \
      KC_CAPS, KC_A,    KC_S,    KC_D,    KC_F,   KC_G,   KC_H,   KC_J,   KC_K,   KC_L,    KC_SCLN, KC_QUOT,  KC_NO,             KC_ENT,    \
      KC_LSFT, KC_NO,   KC_Z,    KC_X,    KC_C,   KC_V,   KC_B,   KC_N,   KC_M,   KC_COMM, KC_DOT,  KC_SLSH,  KC_RSFT, KC_UP,    KC_SLSH,    \
      KC_LCTL, KC_LGUI, KC_LALT,                  KC_BSPC,KC_SPC, KC_DEL,                  KC_RGUI, MO(1),   KC_LEFT, KC_DOWN,  KC_RIGHT),

  // 1: Function Layer
  [1] = LAYOUT_all(
      RESET,   KC_F1,   KC_F2,   KC_F3,   KC_F4,    KC_F5,  KC_F6,  KC_F7,  KC_F8,  KC_F9,   KC_F10,  KC_F11,   KC_F12,  KC_NO,    KC_NO,     \
      KC_NO,   RGB_HUI, RGB_SAI, RGB_VAI, RGB_MOD,  KC_HOME,KC_CALC,KC_NO,  KC_INS, KC_NO,   KC_PSCR, KC_SLCK,  KC_PAUS,          KC_DEL,    \
      KC_NO,   RGB_HUD, RGB_SAD, RGB_VAD, RGB_RMOD, KC_END, KC_PGDN,KC_NO,  KC_NO,  KC_NO,   KC_HOME, KC_PGUP,  KC_NO,            KC_ENT,    \
      KC_LSFT, KC_NO,   KC_NO,   KC_APP,  BL_STEP,  KC_NO,  KC_NO,  KC_VOLD,KC_VOLU,KC_MUTE, KC_END,  KC_RSFT,  KC_NO  , KC_PGUP,  KC_INS,    \
      KC_LCTL, KC_LGUI, KC_LALT,                    KC_BSPC,KC_SPC, KC_DEL,                  KC_RGUI, MO(1),    KC_HOME, KC_PGDOWN,KC_END),

};

// Macros
/*
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {

  // MACRODOWN only works in this function
  switch(id) {
    case 0:
      if (record->event.pressed) { register_code(KC_RSFT); }
开发者ID:Talljoe,项目名称:qmk_firmware,代码行数:31,代码来源:keymap.c

示例14: LAYOUT_ergodox

 *   |FN2   | COPY | CUT  | PASTE| FN1  |                                       |   [  |   ]  |   \  | UNDO | CTRL+A |
 *   `----------------------------------'                                       `------------------------------------'
 *                                        ,-------------.       ,-------------.
*                                         | DEL  |      |       | END  | HOME   |
 *                                 ,------|------|------|       |------+--------+------.
 *                                 |      |      | SUPER|       | PgUp |        |      |
 *                                 | BACK | CTRL |------|       |------|  Enter |SPACE |
 *                                 | SPACE|      | ALT  |       | PgDn |        |      |
 *                                 `--------------------'       `----------------------'
 */
[0] = LAYOUT_ergodox(
	TG(1),     KC_1,       KC_2,       KC_3,       KC_4,  KC_5, LALT(KC_LSHIFT),
	KC_TAB,    KC_QUOTE,   KC_COMMA,   KC_DOT,     KC_P,  KC_Y, TG(3),
	KC_ESCAPE, KC_A,       KC_O,       KC_E,       KC_U,  KC_I,
	KC_LSHIFT, KC_SCOLON,  KC_Q,       KC_J,       KC_K,  KC_X, TG(2),
	MO(3),     LCTL(KC_C), LCTL(KC_X), LCTL(KC_V), MO(2),
	                                          KC_DELETE, KC_TRNS,
	                                                     KC_LGUI,
	                              KC_BSPACE,CTL_T(KC_NO),KC_LALT,
	
	KC_TILD,   KC_6,    KC_7,        KC_8,        KC_9,      KC_0,     KC_EQUAL,
	KC_TRNS,   KC_F,    KC_G,        KC_C,        KC_R,      KC_L,     KC_SLASH,
	KC_D,      KC_H,    KC_T,        KC_N,        KC_S,      KC_MINUS,
	KC_TRNS,   KC_B,    KC_M,        KC_W,        KC_V,      KC_Z,     KC_LSHIFT,
	                    KC_LBRACKET, KC_RBRACKET, KC_BSLASH, KC_UNDO,  LCTL(KC_A),
	KC_END,    KC_HOME,
	KC_PGUP,
	KC_PGDOWN, KC_ENTER, KC_SPACE
),

 /* Keymap 1: Hebrew layer
开发者ID:Talljoe,项目名称:qmk_firmware,代码行数:31,代码来源:keymap.c

示例15: LAYOUT

 */
#include QMK_KEYBOARD_H

// Defines the keycodes used by our macros in process_record_user
enum custom_keycodes {
  MANUAL = SAFE_RANGE,
  DBLZERO
};

const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
	[0] = LAYOUT( /* Base */
		TO(1),   KC_ESC,  KC_1,    KC_2,    KC_3,    KC_4,    KC_5,    KC_6,    KC_7,    KC_8,    KC_9,    KC_0,    KC_LBRC, KC_BSPC, \
		TO(1),   KC_TAB,  KC_Q,    KC_W,    KC_E,    KC_R,    KC_T,    KC_Y,    KC_U,    KC_I,    KC_O,    KC_P,    KC_RBRC, KC_BSLS, \
		KC_NO,   KC_CAPS, KC_A,    KC_S,    KC_D,    KC_F,    KC_G,    KC_H,    KC_J,    KC_K,    KC_L,    KC_SCLN, KC_QUOT, KC_ENT,  \
		KC_NO,   KC_LSFT, KC_Z,    KC_X,    KC_C,    KC_V,    KC_B,    KC_N,    KC_M,    KC_COMM, KC_DOT,  KC_SLSH, KC_PSCR, KC_DEL,  \
			     KC_LCTL, KC_LCTL, KC_LGUI, KC_LALT, MO(1),   KC_SPC,  KC_SPC,  MO(2),   KC_GRV,  KC_MENU, KC_MINS, KC_EQL 
	),
	[1] = LAYOUT( /* Fn, Arrowkeys, Media control, Backlight */
		TO(2),   _______, KC_F1,   KC_F2,   KC_F3,   KC_F4,   KC_F5,   KC_F6,   KC_F7,   KC_F8,   KC_F9,   KC_F10,  KC_VOLU, _______, \
		TO(2),   _______, _______, KC_PGUP, _______, _______, KC_F11,  KC_F12,  _______, KC_UP,   _______, _______, KC_VOLD, BL_STEP, \
		TO(0),   _______, KC_HOME, KC_PGDN, KC_END,  _______, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, KC_MPLY, _______, \
		TO(0),   _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_INS,  \
			     _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
	),
	[2] = LAYOUT( /* Mousekeys and Numpad */
		KC_NO,   _______, _______, _______, _______, _______, _______, KC_NLCK, KC_P7,   KC_P8,   KC_P9,   KC_PSLS, _______, _______, \
		KC_NO,   _______, KC_BTN1, KC_MS_U, KC_BTN2, KC_WH_U, _______, _______, KC_P4,   KC_P5,   KC_P6,   KC_PAST, _______, _______, \
		TO(1),   _______, KC_MS_L, KC_MS_D, KC_MS_R, KC_WH_D, _______, _______, KC_P1,   KC_P2,   KC_P3,   KC_PMNS, _______, _______, \
		TO(1),   _______, KC_ACL0, KC_ACL1, KC_ACL2, KC_BTN3, _______, DBLZERO, KC_P0,   KC_PDOT, KC_PENT, KC_PPLS, _______, MANUAL,  \
			     _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
	)
开发者ID:UnderSampled,项目名称:qmk_firmware,代码行数:31,代码来源:keymap.c


注:本文中的MO函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。