All Downloads are FREE. Search and download functionalities are using the official Maven repository.

commonMain.jetbrains.datalore.base.event.KeyModifiers.kt Maven / Gradle / Ivy

There is a newer version: 4.5.3-alpha1
Show newest version
/*
 * Copyright (c) 2019. JetBrains s.r.o.
 * Use of this source code is governed by the MIT license that can be found in the LICENSE file.
 */

package jetbrains.datalore.base.event

class KeyModifiers(val isCtrl: Boolean, val isAlt: Boolean, val isShift: Boolean, val isMeta: Boolean) {

    private constructor() : this(false, false, false, false)

    companion object {

        private val EMPTY_MODIFIERS = KeyModifiers()

        fun emptyModifiers(): KeyModifiers {
            return EMPTY_MODIFIERS
        }

        fun withShift(): KeyModifiers {
            return KeyModifiers(false, false, true, false)
        }
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy